Commit 0b0af680 authored by Léo Bouscarrat's avatar Léo Bouscarrat
Browse files

Correction for predict_no_weights

parent 4451d835
......@@ -48,7 +48,7 @@ class OmpForestBinaryClassifier(SingleOmpForest):
result_omp = np.mean(omp_trees_predictions, axis=1)
result_omp = np.array([-1 if pred < 0.5 else 1 for pred in result_omp])
result_omp = (result_omp - 0.5) * 2
return result_omp
......
......@@ -108,7 +108,7 @@ class Trainer(object):
else:
y_pred = model.predict_no_weights(X)
if type(model) is OmpForestBinaryClassifier:
y_pred = y_pred.round()
y_pred = np.sign(y_pred)
result = self._classification_score_metric(y_true, y_pred)
return result
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment