【发布时间】:2016-08-31 03:51:26
【问题描述】:
我已经从 UCI 下载了一些数据集,用于 RVM 任务的分类。但是,我不确定如何使用它。我想这些数据集在用于训练和测试之前必须进行规范化或做一些其他工作。 比如我在UCI上下载了'钞票鉴权数据集',在matlab中使用svmtrain得到一个svm模型(用svm模型测试数据,如果svm分类结果ok就用rvm代码)。
>> load banknote
>> meas = banknote(:,1:4);
>> species = banknote(:,5);
>> data = [meas(:,1), meas(:,2), meas(:,3), meas(:,4)];
>> groups = ismember(species,1);
>> [train, test] = crossvalind('holdOut',groups);
>> cp = classperf(groups);
>> svmStruct = svmtrain(data(train,:),groups(train),'showplot',true);
这是我在 matlab 中所做的,并得到以下消息:
??? Error using ==> svmtrain at 470
Unable to solve the optimization problem:
Maximum number of iterations exceeded; increase options.MaxIter.
To continue solving the problem with the current solution as the
starting point, set x0 = x before calling quadprog.
这是数据集的一部分(总行数 1372 行,其中一部分用于训练,其余用于测试):
3.6216,8.6661,-2.8073,-0.44699,0
4.5459,8.1674,-2.4586,-1.4621,0
3.866,-2.6383,1.9242,0.10645,0
3.4566,9.5228,-4.0112,-3.5944,0
0.32924,-4.4552,4.5718,-0.9888,0
4.3684,9.6718,-3.9606,-3.1625,0
3.5912,3.0129,0.72888,0.56421,0
2.0922,-6.81,8.4636,-0.60216,0
3.2032,5.7588,-0.75345,-0.61251,0
1.5356,9.1772,-2.2718,-0.73535,0
1.2247,8.7779,-2.2135,-0.80647,0
3.9899,-2.7066,2.3946,0.86291,0
1.8993,7.6625,0.15394,-3.1108,0
-1.5768,10.843,2.5462,-2.9362,0
3.404,8.7261,-2.9915,-0.57242,0
那么,关于这个问题有什么好的建议吗?谢谢大家的帮助。
【问题讨论】: