weixin_43802433 2018-12-17 12:25
浏览 834

LIBSVM-3.23 matlab运行没有结果?

在libsvm-3.23/matlab下运行这个程序:

 data = [180 76;184 77;160 52;165 55];
 label = [1; 1; -1; -1];
 model = libsvmtrain(label,data,'-s 0 -t 2 -c 1 -g 0.1');
 testdata = [189 82;163 49];
 testdatalabel = [1;1];
 [predictlabel,accuracy] = libsvmpredict(testdatalabel, testdata, model);

出来的结果是

*.*
optimization finished, #iter = 5
nu = 0.902449
obj = -1.805008, rho = 0.067372
nSV = 4, nBSV = 0
Total nSV = 4
Usage: [predicted_label, accuracy, decision_values/prob_estimates] = svmpredict(testing_label_vector, testing_instance_matrix, model, 'libsvm_options')
       [predicted_label] = svmpredict(testing_label_vector, testing_instance_matrix, model, 'libsvm_options')
Parameters:
  model: SVM model structure from svmtrain.
  libsvm_options:
    -b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); one-class SVM not supported yet
    -q : quiet mode (no outputs)
Returns:
  predicted_label: SVM prediction output vector.
  accuracy: a vector with accuracy, mean squared error, squared correlation coefficient.
  prob_estimates: If selected, probability estimate vector.
为什么没有显示predictlabel = [1;-1]?
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员
    • ¥15 matlab生成电测深三层曲线模型代码