Skip to content

Commit

Permalink
fix(Metalearner): Fixed postprocessing of Decision Tree prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerdo committed May 22, 2022
1 parent fedac2d commit 72794df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aucmedi/ensemble/metalearner/decision_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def train(self, x, y):
def predict(self, data):
# Compute prediction probabilities via fitted model
pred = self.model.predict_proba(data)
# Postprocess decision tree predictions
pred = np.asarray(pred)
pred = np.swapaxes(pred[:,:,1], 0, 1)
# Return results as NumPy array
return pred

Expand Down

0 comments on commit 72794df

Please sign in to comment.