LIBSVM学习(四)常见错误

来源:互联网 发布:网络电影分账 编辑:程序博客网 时间:2024/06/14 01:57

该文章是本人使用过程中出现的一些问题,下列的解决方法已验证,但不排除其他原因导致出现同样错误的情况,如有不全面的地方可以讨论。

错误一:Traceback (most recent call last):
File “grid.py”, line 223, in run
if rate is None: raise RuntimeError(“get no rate”)
RuntimeError: get no rate

LIBSVM版本问题,刚开始我使用最高版本libsvm-321版本,显示一直是该错误,no rate,查了众多资料发现更改libsvm版本可以完美解决该问题,我使用的是libsvm310版本,python2.7,gnuplot4.6.6,在Windows和linux下均编译成功。

错误二:Timeout: gnuplot is not ready
这里写图片描述

该错误是gnuplot启动出错,解决方案为:重新执行。
重新打开一个窗口,进入到libsvm\tools\目录下,执行grid.py和easy.py.

错误三:set term x11

在linux下,使用gnuplot时显示set term x11,该错误可以忽略,但是想要修改的小伙伴们可以参考这里:http://blog.csdn.net/sweet_life/article/details/7251307。

错误四:gnuplot not found
这里写图片描述

解决方案:gnuplot路径设置错误,修改grid.py中 else条件后的gnuplot_exe路径。

if not is_win32:       svmtrain_exe = "../svm-train"       gnuplot_exe = "/usr/bin/gnuplot"else:       # example for windows       svmtrain_exe = r"..\windows\svm-train.exe"       # gnuplot_exe = r"c:\tmp\gnuplot\bin\pgnuplot.exe"       gnuplot_exe = r"D:\Program Files\gnuplot466\bin\pgnuplot.exe"
0 0
原创粉丝点击