【问题标题】:Output error from grid.py of libsvm来自 libsvm 的 grid.py 的输出错误
【发布时间】:2016-07-24 19:24:42
【问题描述】:

我刚刚使用了libsvm的demo数据heart_scale来测试grid.py,但不幸的是,它总是输出类似这样的错误:

Traceback (most recent call last):
File "grid.py", line 266, in run
if rate is None: raise RuntimeError('get no rate')
RuntimeError: get no rate
worker local quit.

cmd output

我尝试过使用不同版本的 libsvm 和 gnuplot,但遇到了同样的错误。

Versions of libsvms' are : 3.17 and 3.21 
Versions of gnuplots' are : 4.2.6 and 5.0.3
Version of Python : 2.7

另外,我已经修改了grid.py中的目录,

self.svmtrain_pathname = os.path.join(dirname, r'F:\tools\libsvm-master\windows\svm-train.exe')

self.gnuplot_pathname = r'C:\gnuplot\bin\gnuplot.exe'

我在其他问题中阅读了一些答案,但仍然没有用。 链接:output “get no rate” from grid.py of libsvm Error from grid.py of libsvm

谁能帮我弄清楚如何解决这个问题。非常感谢。

【问题讨论】:

    标签: python machine-learning svm libsvm


    【解决方案1】:

    我遇到了同样的问题,我很容易发现原因。希望对你有帮助。

    尝试像svm-train my_data.txt一样直接使用svm-train,检查是否处理。

    我执行了这个命令,发现我的 input_file (my_data.txt) 是错误的。输出提示我输入文件的错误行。我修改了它,然后它工作了。

    如果它不起作用,请评论我或参考类似的答案,如output "get no rate" from grid.py of libsvm

    【讨论】:

      【解决方案2】:

      其实我用了不同版本的libsvm和gnuplots,发现gnuplots的版本太新了,用老版本终于可以解决问题了。

      【讨论】:

        猜你喜欢
        • 2015-03-09
        • 2013-05-14
        • 2015-02-16
        • 2014-01-11
        • 2015-04-12
        • 2013-02-21
        • 2013-05-04
        • 2012-07-09
        • 1970-01-01
        相关资源
        最近更新 更多