Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run easy.py of libsvm in window?

I am new to the libsvm and sorry for some silly questions. I am trying to run easy.py but have problems to do so. I have

  1. downloaded the libsvm-3.1 package and extract it into C:\User\Cassie\libsvm
  2. Install Python and it created a folder at C:/Python27
  3. Download gp443win32.zip and extract it to a folder gnuplot at Download folder. Make a copy of gnuplot.exe and paste it to C:\User\Cassie\libsvm3-1\libsvm3-1\tools
  4. invoke cmd at Window 7 and typed "easy.py myfile.txt". But an error message showed

"Traceback (most recent call last): File "C:\User\Cassie\libsvm-3.1\libsvm-3.1\tools\easy.py", line 31, in assert os.path.exists(gnuplot_exe),"gnuplot executable not found" AssertionError: gnuplot executable not found"

Questions:

  1. Did I install the wrong gnuplot package?
  2. Did I move the wrong application ? gnuplot.exe
  3. Did I need to configure some path or envinroment to make the cmd find gnuplot.exe ?
  4. Did I type the wrong command to make easy.py run ?
  5. Do I have to label the training file first ?

There are much information at libsvm and I was really confused. Any experience with this issue is welcome. Thank you all very much,

like image 593
Cassie Avatar asked Sep 01 '11 04:09

Cassie


2 Answers

It looks like a "path problem". So open easy.py in text editor and go the line 25 which will look something like "gnuplot_exe = r"c:\tmp\Desktop\gnuplot\bin\pgnuplot.exe".

so you need to put the exact path of gnuplot stored , for example for me it was "gnuplot_exe = r"c:\Documents and Settings\Desktop\gnuplot\binary\pgnuplot.exe".

I Hope this will help you!!!

like image 75
machine_learning Avatar answered Oct 03 '22 17:10

machine_learning


  1. Please check your path of gnuplot.exe, check every character;
  2. Please install other version of gnuplot, maybe the version of gnuplot is incompatible whih the current version of libSVM;
  3. In my computer, LibSVM 3.2.1 gnuplot 5.0.1 python 2.7. It is OK!
like image 25
Wisdom Avatar answered Oct 03 '22 17:10

Wisdom