Esempio n. 1
0
def load_data_svm():
    print("[INFO] Loading svm-light format data...")
    global features
    global target
    features, target = load_svmlight_file(data_io.read_train_svm())
    features = features.todense()
    return features, target
Esempio n. 2
0
def load_data_svm():
    print("[INFO] Loading svm-light format data...")
    global features
    global target
    features, target = load_svmlight_file(data_io.read_train_svm())
    features = features.todense()
    return features, target
Esempio n. 3
0
def save_to_train(st):
    data = open(data_io.read_train_svm(), "a")
    try:
        data.write(st + "\n")
        data.close()
    except Exception, e:
        pass
Esempio n. 4
0
def save_to_train(st):
    data = open(data_io.read_train_svm(), "a")
    try:
        data.write(st + "\n")
        data.close()
    except Exception, e:
    	pass