使用Libsvm工具箱的话,在函数svmtrain和svmpredict的输入参数部分加入'-b 1'、函数svmpredict的输出参数增加至3个即可(例如 [~, ~, prob_estimates] = svmpredict(label_test, feature_test, svmStruct, '-b 1'),其中prob_estimates 即为输出...
具体看看这里:
http://blog.csdn.net/iichangle/article/details/46817999