-
大小: 16KB文件類型: .py金幣: 1下載: 0 次發布日期: 2021-01-02
- 語言: Python
- 標簽:
資源簡介
libsvm gridregression.py
放在C:\libsvm-2.xx\python里面就可以了
代碼片段和文件信息
#!/usr/bin/env?python
#?This?gridregression.py?is?modified?from?grid.py?in?LIBSVM?3.17?version
__all__?=?[‘find_parameters‘]
import?os?sys?traceback?getpass?time?re
from?threading?import?Thread
from?subprocess?import?*
if?sys.version_info[0]?3:
from?Queue?import?Queue
else:
from?queue?import?Queue
telnet_workers?=?[]
ssh_workers?=?[]
nr_local_worker?=?1
class?GridOption:
def?__init__(self?dataset_pathname?options):
dirname?=?os.path.dirname(__file__)
if?sys.platform?!=?‘win32‘:
self.svmtrain_pathname?=?os.path.join(dirname?‘../svm-train‘)
self.gnuplot_pathname?=?‘/usr/bin/gnuplot‘
else:
#?example?for?windows
self.svmtrain_pathname?=?os.path.join(dirname?r‘..\windows\svm-train.exe‘)
#?svmtrain_pathname?=?r‘c:\Program?Files\lib
- 上一篇:《think python》PDF
- 下一篇:Python貪吃蛇
評論
共有 條評論