Skip to content

Commit

Permalink
fix: use log probs for KNNClassifier.predict_log_proba (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
eonu authored Apr 2, 2024
1 parent b1aeb60 commit d93bab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sequentia/models/knn/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def predict_log_proba(
-----
This method requires a trained classifier — see :func:`fit`.
"""
return np.log(self.predict_scores(X, lengths=lengths))
return np.log(self.predict_proba(X, lengths=lengths))

@_validation.requires_fit
def predict_proba(
Expand Down

0 comments on commit d93bab5

Please sign in to comment.