How to set training and taget data for training neural networks?

1 view (last 30 days)
I have a training set 25 rows and 298 columns. rows correspond to samples and columns correspond to features. The samples in first 5 rows correspond to class 1, next 5 to class 2 and so on up to class 5. And I have a test matrix with same dimensions. I'm confused with the way inputs and target values are supplied for training in neural network. I saw somewhere that it should be excel format. I don't understand how this can be done. Thanks.

Accepted Answer

Greg Heath
Greg Heath on 9 Apr 2015
Make life easy and use a *.txt file. For the NNTBX you will have to transpose your matrices. For classification use patternnet with target matrices containing columns of eye(5)
[ I N ] = size(input) % [ 298 25 ]
[ O N ] = size(target) % [ 298 25 ]
However, 25 examples define AT MOST a 24-dimensional input space.
Therefore you have to DRASTICALLY REDUCE the dimensionality of your input space. For this I recommend
help PLSREGRESS
doc PLSREGRESS
Then
help patternnet
doc patternnet
Followed with searches for some of my examples in both the NEWSGROUP and ANSWERS
greg patternnet
Hope this helps.
Thank you for formally accepting my answer
Greg
  2 Comments
Nafeesath Musfira
Nafeesath Musfira on 10 Apr 2015
thank you sir, but how do i create text file, can you please specify the format in which I can write the data sets into a text file. do i need to create a text file for each sample?
Greg Heath
Greg Heath on 22 Apr 2015
You only need two matrices: input and target. The sizes are given above.
Or am I missing something?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!