示例#1
0
def init(i=0,j=62):
	global clf
	global a
	global b
	clf=svm.SVC()
	a,b=rt.read(i,j)
	clf.fit(a[0],a[1])
def init(i=0, j=3):
    global clf
    global a
    global b
    clf = svm.SVC()
    a, b = rt.read(i, j)
    print a
    print b
    clf.fit(a[0], a[1])
import readtr as rt
from sklearn import svm
import readf as rd
import numpy as np
import cnvrt_value as cnv
clf = svm.SVC()
a, b = rt.read()
res = []
res_converted = []


def init(i=0, j=3):
    global clf
    global a
    global b
    clf = svm.SVC()
    a, b = rt.read(i, j)
    print a
    print b
    clf.fit(a[0], a[1])


def main(testfile=None):
    global clf
    global a
    global b
    if testfile:
        tf = rd.read(testfile)
        ts = np.array(tf)
        res = clf.predict(ts)
        for i in res: