Error using newrb and newgrnn
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a code for svm for classifying
load fisheriris
xdata = meas(51:end,3:4);
group = species(51:end);
svmStruct = svmtrain(xdata,group,'showplot',true);
same way i tried using newrb and newgrnn
net = newgrnn(xdata,group)
??? Error using ==> cat
CAT arguments dimensions are not consistent.
Error in ==> cell2mat at 89
m{n} = cat(1,c{:,n});
Error in ==> newgrnn at 70
if isa(t,'cell'), t = cell2mat(t); end
please tell how to fix it
syntax for those says, data and target class,but why i get error
댓글 수: 0
채택된 답변
Greg Heath
2013년 1월 7일
help grnn
doc grnn
explain the required type and orientation of the input and target data
whos
shows both the type and orientation of your data
xdata
group
without the semicolons allows you to "see" the data.
With the above info you should be able to readily debug your code.
Hope this helps.
Thank you for formally accepting my answer.
Greg
댓글 수: 3
Greg Heath
2013년 1월 7일
You created the net to output 0 when either of the first two P columns are used as input and to output 1 when one of the last three columns of P are used as input.
Have you folloed up on my previous advice?
If so are there anymore questions?
G
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File 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!