【问题标题】:Probability estimate for multi class classification in libsvm for matlablibsvm for matlab中多类分类的概率估计
【发布时间】:2015-05-06 21:54:26
【问题描述】:

我对 libsvm 中的多类分类的概率估计有疑问。 我有 5 个从 0 到 4 的标签,svmpredict 返回一个矩阵“prob_estimates”985x10,其中 985 是测试集的数量,10 应该是标签的数量。我认为有一个错误,因为我有 5 个标签,但我不明白为什么以及我能做些什么来解决这个问题。

代码是这样的:

model = svmtrain(train_label, train, ['-c' num2str(best_C) ' -g ' num2str(best_gamma) ' -b 1']); [predict_label, accuracy, prob_estimates] = svmpredict(test_label, test, model);

“test_label”是一个 985x1 的矩阵,数字从 0 到 4。
“测试”是一个 985x1987 的特征矩阵。

有人可以帮助我吗? 谢谢。

【问题讨论】:

    标签: matlab


    【解决方案1】:

    问题已解决:
    我更改了如下代码:

    model = svmtrain(train_label, train, ['-c ' num2str(best_C) ' -g ' num2str(best_gamma) ' -b 1']); [predict_label, accuracy, prob_estimates] = svmpredict(test_label, test, model, '-b 1 -q');

    我在 svmpredict 中添加了这个参数:'-b 1 -q'。

    【讨论】:

      猜你喜欢
      • 2012-12-06
      • 2014-08-11
      • 2014-04-07
      • 2011-12-09
      • 2013-05-18
      • 2014-03-18
      • 2015-02-01
      • 2011-02-15
      • 2014-09-05
      相关资源
      最近更新 更多