def save_to_test(can): data = open(data_io.read_test_svm(), "w") try: for st in can: data.write(st + "\n") data.close() except Exception, e: pass
def estimate(): features, target = load_svmlight_file(data_io.read_test_svm()) features = features.todense() print("[INFO] Loading the classifier") classifier = data_io.load_model() print("[INFO] Making predictions") predictions = classifier.predict_proba(features) return predictions