Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Can anyone plz help regarding svmtrain in matlab?
    3 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I get these errors when I use svmtrain() in matlab.What to do?
Error using | Matrix dimensions must agree.
Error in svmtrain (line 265) nans = any(isnan(training)|isnan(groupIndex),2);
3 件のコメント
  Andrew Reibold
      
 2014 年 8 月 5 日
				This is very petty and you can ignore it, but most of the community would appreciate the extra half second to type out 'please' haha. Good luck!
回答 (1 件)
  Shaarif Zia
    
 2014 年 8 月 5 日
        A grouping variable must have the same number of observations (rows) as the table, data set array, or numeric array you are grouping. (Read here )
Assuming you have 24 data points in 2D space (i.e. with two features each) and 24 labels of which 12 are 1's and 12 are -1's.
labels = [ones(12,1);-ones(12,1)];
Hope this helps.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!