Problem with targets in nprtool
6 次查看(过去 30 天)
显示 更早的评论
I'm trying to train a ANN using the nprtool but i can't select my targets. The targets option is empty while the inputs shows all my data. Why is it happening? Any idea?
Thanks in advance
4 个评论
Greg Heath
2016-5-27
Not at all! For c classes, the target columns are columns of the {0,1} unit matrix eye(c);
[ x t ] = iris_dataset;
whos % No semicolon
t = t % No semicolon
Hope this helps.
Greg
采纳的回答
Neeraj N Sajjan
2016-5-26
If you have n classes ,then your target matrix for nprtool should be a n*m matrix where m is the number of training samples. Each column of the matrix should have a 1 in the row representing the corresponding class with the rest as 0.
1 个评论
Greg Heath
2016-5-27
CORRECT!
The target columns should be a {0,1} unit vector column of the unit matrix
eye(n).
See my above comment.
Greg
更多回答(4 个)
Alan Norman
2012-9-10
编辑:Alan Norman
2012-9-10
I changed my target from a single integer 1 to 10 to a vector of [ 0 0 0 1 0 0 0 0 0 0 ] for each example and then my target appears in the GUI and life is good.
0 个评论
Jonatan Zapata
2012-4-18
I had the same problem with negative targets, I changed it with positive values and solve the problem.
0 个评论
Razieh
2014-2-22
I have the same problem. My target has size of 6*3600 and it's format is [0.9 0.1 0.1 0.1 0.1 0.1] and loaded into workspace but not appear to be chosen in nprtool, but input is ok. Can anybody help?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!