labeling target in neural network in matlab
Show older comments
I have a training set of 200rows, 600columns as the training set, each 5 rows represent feature vectors from one subject, meaning I have 40 subjects. How do I label the target in neural network such that I have the same 5 labels for each subject meaning I would have 40 labels at the end or have 200 different labels for the whole feature vector. because in matlab neural network only accept 0 0r 1 as target label but I want to have for 40 labels (1,2,3.....40) or for 200 labels (1,2,3....200).
Accepted Answer
More Answers (2)
Jack Sparrow
on 12 Mar 2013
0 votes
Greg Heath
on 12 Mar 2013
0 votes
Your basic problem is input variable subset selection. Say from 600 to 39. However, if you design 40 classifiers, you have 40 different variable subset selection problems.
Believe me, NOT the way to go.
You don't need the optimal selection, just a good one. Again, standardizing and using a linear coefficient model tends to work well. Learn how to choose a good subset for a linear classifier. Then use them in a neural classifier.
If you are familiar with PCA, you could try that 1st. However, that ranks orthogonal PCA variables based on their spread without taking into account the relative positions of target classes.
LDA would be better, it ranks orthogonal LDA variables (generalized eigenvectors w.r.t within-class and between-class covariance matrices). with respect to between-class to within-class spread ratios.
PLS is also better than PCA because it depends on both input and target matrices. Not sure how it compares with LDA.
If you want to choose original variables and not orthogonal transformed ones, then look at STEPWISE and STEPWISEFIT.
I tend to use the latter and sometimes include 2nd order variable terms.
However, I don't remember trying to deal with 600 original variables. Maybe you could try 6 subsets of 100 variables, select subsets from each of them and then combine them for a final subset selection. I don't know at what point your computer will choke on I input variables.
Hope this helps.
Greg
Categories
Find more on Pattern Recognition in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!