Filter löschen
Filter löschen

Problem with targets in nprtool

3 Ansichten (letzte 30 Tage)
Ethan
Ethan am 5 Okt. 2011
Kommentiert: Greg Heath am 27 Mai 2016
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 Kommentare
udoInyang inyang
udoInyang inyang am 10 Mai 2016
The target must contain binary data. That a maximum of two classes.
Greg Heath
Greg Heath am 27 Mai 2016
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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Neeraj N Sajjan
Neeraj N Sajjan am 26 Mai 2016
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 Kommentar
Greg Heath
Greg Heath am 27 Mai 2016
CORRECT!
The target columns should be a {0,1} unit vector column of the unit matrix
eye(n).
See my above comment.
Greg

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (4)

Alan Norman
Alan Norman am 10 Sep. 2012
Bearbeitet: Alan Norman am 10 Sep. 2012
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.

Jonny
Jonny am 16 Okt. 2011
Do you have your targets in your folder where are your inputs?
  1 Kommentar
Ethan
Ethan am 17 Okt. 2011
Yes, they are in the same folder and both are loaded in the memory

Melden Sie sich an, um zu kommentieren.


Jonatan Zapata
Jonatan Zapata am 18 Apr. 2012
I had the same problem with negative targets, I changed it with positive values and solve the problem.

Razieh
Razieh am 22 Feb. 2014
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?
  1 Kommentar
Greg Heath
Greg Heath am 24 Feb. 2014
Did you try replacing 0.1,0.9 to 0,1 ?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by