Hamid Reza Sedigh
Hamid Reza Sedigh

Reputation: 63

How to test neural network after training

I train a NN with pattern recognition toolbox in matlab my input is a 3*42 matrix(42 samples 3 features) my target is a 4*42 matrix which is 1 for true classes like this:

1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

I trained my NN now I want to test with new data it I use this code:

output = sim(net,testinputs)

or

a = net(testinputs)

but the Problems is it gives me a 4*3 matrix which is wrong, it should be a 4*1 matrix that one row is 1 another rows be 0. What should I do to get the correct answer?

Upvotes: 1

Views: 1439

Answers (1)

zoran
zoran

Reputation: 31

Why yo don't try with different shape of data, using column notations

Input data should be,according to your notation, try different 42*3, in other word you will have 3 columns(features) and 42 rows(samples) then your target should not be in format 4*42 , it should be 42*4 (4 columns,42 rows)

Upvotes: 1

Related Questions