필터 지우기
필터 지우기

Problem with targets in nprtool

조회 수: 3 (최근 30일)
Ethan
Ethan 2011년 10월 5일
댓글: Greg Heath 2016년 5월 27일
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
udoInyang inyang
udoInyang inyang 2016년 5월 10일
The target must contain binary data. That a maximum of two classes.
Greg Heath
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
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
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
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.

Jonny
Jonny 2011년 10월 16일
Do you have your targets in your folder where are your inputs?
  댓글 수: 1
Ethan
Ethan 2011년 10월 17일
Yes, they are in the same folder and both are loaded in the memory

댓글을 달려면 로그인하십시오.


Jonatan Zapata
Jonatan Zapata 2012년 4월 18일
I had the same problem with negative targets, I changed it with positive values and solve the problem.

Razieh
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?
  댓글 수: 1
Greg Heath
Greg Heath 2014년 2월 24일
Did you try replacing 0.1,0.9 to 0,1 ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by