如何使用UCI数据集进行RVM分类?

时间:2016-05-05 11:18:02

标签: matlab rvm svm

我已从UCI下载了一些数据集,用于RVM任务的分类。但是,我不确定如何使用它。我猜这些数据集必须标准化或做一些其他工作才能用于训练和测试。 例如,我已经下载了“钞票身份验证数据集'在UCI上。并在matlab中使用svmtrain获取svm模型(使用svm模型测试数据,然后使用rvm代码,如果svm分类结果正常)。

>> 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

那么,关于这个问题的任何好建议?谢谢大家的帮助。

1 个答案:

答案 0 :(得分:0)

稍后提交。使用缩放功能来规范化特征。如果数据集具有太多特征,我们可以使用PCA来减少维度。