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