In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to parse the Python script, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Scripts use a specific descriptive language, because Python scripts are executed with one more translation process, so it is slightly less efficient than binary programs, which greatly improves the productivity of developers.
First of all, we need to download libsvm, which can be downloaded from libsvm's home page http://www.csie.ntu.edu.tw/~cjlin/libsvm/. I downloaded libsvm-2.89. It is recommended to download a beginner guide of libsvm at the same time, which is well written, easy to understand and suitable for beginners.
Basic use only requires libsvm, but if you need to use its own Python script, you also need to install python,*** version 2.5, which can be downloaded from the Python script's home page, http://www.python.org. In addition, libsvm comes with two scripts grid.py and easy.py are used in the drawing tool gnuplot, so you also need to download a gnuplot software, download address: ftp://ftp.gnuplot.info/pub/gnuplot/, pay attention to download the win32 version, such as win32 version 4.0 corresponding to the file should be gp400win32.zip.
After the download is complete, the installation is next. Only python2.6 needs to be installed (usually installed under c:\ python26 by default). Extract libsvm to c:\ libsvm and gnuplot to c:\ gnuplot. Add three folders c:\ python26,c:\ libsvm\ windows,c:\ gnuplot\ bin to the system path for future use.
After installation, go to the c:\ libsvm\ tools directory, modify the grid.py and easy.py files with a text editor (notepad, edit can both), find the item about the gnuplot path, modify it according to the actual path, and save it.
(1): right-click easy.py in the point and select Edit with IDLE to open it, and modify the path under else as follows:
Else: # example for windows gnuplot_exe = r "c:\ gnuplot\ bin\ pgnuplot.exe"
(2): right-click grid.py and select Edit with IDLE to open it, and modify the path under else as follows:
Else: # example for windows gnuplot_exe = r "c:\ gnuplot\ bin\ pgnuplot.exe" then you can run easy.py and grid.py under dos. For example, cd C:\ libsvm-2.89\ tools python grid.py train.txt
It was supposed to be right, but now there is an error, as shown in the figure:
All right, now it's stuck in the Python script.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.