Libsvm Python debugging experiment

Source: Internet
Author: User

1. I installed Python-2.5.1 In the c: \ python25 path of drive C.
2.my gnuplotis in libsvm-2_6.rar, an attachment on the Research Forum. I will upload it later. after decompression, you can see that in the folder gp373w32, other files and folders are not required, as long as the folder gp373w32. I copied the folder directly to drive D: \ gp373w32. lin zhiren's libsvm-2.82 is in my other post (not at the beginning, in the middle, find it yourself)
3. The libsvm-2.82 of Lin Zhi Ren is placed under D: \ libsvm-2.82 path.
4. Copy easy. py and grid. py in D: \ libsvm-2.82 \ tools to D: \ libsvm-2.82 \ Python
5. In D: \ libsvm-2.82 \ python, modify the paths of easy. py and grid. py:
(1): click "easy. py" and select "Edit with idle" from the context menu.
Modify the path under else as follows (of course, this is my path. If you place different paths, modify the path as per your own ):
Else:
# Example for Windows
Svmscale_exe = r "d :\ libsvm-2.82 \ windows \ svmscale.exe"
Svmtrain_exe = r "D: \ libsvm-2.82 \ windows \ svmtrain.exe"
Svmpredict_exe = r "d :\ libsvm-2.82 \ windows \ svmpredict.exe"
Gnuplot_exe = r "D: \ gp373w32 \ pgnuplot.exe"
Grid_py = r "d :\libsvm-2.82 \ Python \ grid. py"
(2): Right-click grid. py and select Edit with idle.
Modify the path under else as follows (of course, this is my path. If you place different paths, modify the path as per your own ):
Else:
# Example for Windows
Svmtrain_exe = r "D: \ libsvm-2.82 \ windows \ svmtrain.exe"
Gnuplot_exe = r "D: \ gp373w32 \ pgnuplot.exe"
6. Place the file heart_scale in D: \ libsvm-2.82 in D: \ libsvm-2.82 \ Python
Now you can run easy. py and grid. py in DOS:
First, go to cd c: \ python25.
Again Python D: \ libsvm-2.82 \ Python \ easy. Py D: \ libsvm-2.82 \ Python \ heart_scale
Press enter to view the result.
Thanks again, Jimin and zuosheng !!!!!
Description: Libsvm-2_6.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.