Exemple #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
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
Exemple #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
def save_to_train(st):
    data = open(data_io.read_train_svm(), "a")
    try:
        data.write(st + "\n")
        data.close()
    except Exception, e:
    	pass