【问题标题】:svmtrain error "Group must be a vector."svmtrain 错误“组必须是向量。”
【发布时间】:2013-03-15 05:11:26
【问题描述】:

我正在尝试使用LibSVM 的 Matlab 接口训练 SVM,但出现以下错误

 model = svmtrain(Classes(train),Attributes(train,:),'-s 0 -t 2');
 ??? Error using ==> svmtrain at 172 Group must be a vector.

另见评论:support vector machines in matlab

【问题讨论】:

    标签: matlab libsvm


    【解决方案1】:

    问题是,Matlab 正在使用它的own SVM implementation,它以不同的顺序获取变量。

    要使其正常工作,请确保 LibSVM 库是您的 Matlab 搜索路径的一部分。一种选择是使用 Matlab 文件浏览器 (Current Folder) 进入 LibSVM 文件夹并使用菜单 Add to Path -> Selected Folders and Subfolders。如果这可以解决您的问题并且您需要定期使用 LibSVM,请使用 addpath 将该文件夹添加到您的 startup.m

    另见:Error: Undefined function or method 'svmtrain' for input arguments of type 'double'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-16
      • 1970-01-01
      • 1970-01-01
      • 2015-04-03
      • 2014-03-18
      • 2016-12-11
      • 2020-09-18
      相关资源
      最近更新 更多