Contradiction with Wine Classification Example in Artificial Neural Network Tool(2014)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
akde
am 29 Mai 2015
Beantwortet: Greg Heath
am 30 Mai 2015
Dear Sir/Madam;
I am following the example about the wine classification in the following link; http://nl.mathworks.com/help/nnet/examples/wine-classification.html
Instead of 'x' and 't' arrays I have 'train_set_input' and 'train_set_target' with dimensions 11x830 and 2x830 respectively
I create the net by using
net = patternnet(15);
then train it by
[net,tr] = train(net,train_set_input,train_set_target);
in the wine example the net is like the following;
which provides output as 1 or 2 or 3.
In my case I get the following net;
My outputs can be any value between 0 and 1.
What should I do to get discrete outputs as it is in the example? (instead of some value between 0 and 1, I want either 0 or 1).
PS(please note the differences between the output layers shown in the net. How can I get the similar net?)
Yours Sincerely
0 Kommentare
Akzeptierte Antwort
Greg Heath
am 30 Mai 2015
I don't know how you ended up with that configuration. However, it will work if you use vec2ind on the output to obtain the class indices.
Hope this helps.
Thank you for formally accepting my answer
Greg
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!