将训练有素的SVM应用于全新数据,检索标签

时间:2017-08-23 19:20:12

标签: matlab svm

假设我有一个简单的SVM分类实现,例如:

%# train an SVM model over training instances    
svmModel = svmtrain(meas(trainIdx,:), groups(trainIdx), ...       
             'Autoscale',true, 'Showplot',false, 'Method','QP', ...        
             'BoxConstraint',2e-1, 'Kernel_Function','rbf', 'RBF_Sigma',1);   

%# test using test instances  
pred = svmclassify(svmModel, meas(testIdx,:), 'Showplot',false);  

%# evaluate and update performance object
cp = classperf(cp, pred, testIdx);

现在我需要以下内容:在一个数据集上训练分类器,我有标签,然后将其应用到另一个我根本不知道标签的数据集。这可能吗?如果是这样,我会使用预测(" pred")的行来对未标记数据进行分类(或者根据我的标记数据优化参数并使用最佳模型预测测试数据)?

0 个答案:

没有答案
相关问题