How to modify easy.py in libsvm-3.18 to solve error "Trackback <most recent call last>: File "easy.py", line 6----
Asked Answered
P

1

0

While using easy.py script it generates error as shown in figure:

enter image description here

Path for gnuplot is set well. There is no problem in using grid.py

Some people suggested (http://www.cnblogs.com/tekson/archive/2009/05/25/1489222.html) to change following line in easy.py:

cmd = '{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)

But no idea how to modify above code line to resolve the problem.

If anyone have got same problem and solved this, please let me know. Thanks in advance.

Psyche answered 23/9, 2014 at 8:49 Comment(2)
I suppose to remove lines 56-63 and replace line 65 with the above.Gadhelic
Thanks for reply @pacholik, however that do not seems to work because we need c, g, rate values which are generated from lines 56-63.Psyche
P
1

Finally I found the solution. I think it will be helpful for those who are facing same problem.

Thanks to: http://huangbo929.blog.edu.cn/home.php?mod=space&uid=294073&do=blog&id=70541

Solution:

Replace Line

"cmd = '{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)"

With

cmd = 'python {0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)

Psyche answered 24/9, 2014 at 1:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.