-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabular: Raise regression pred_proba #3240
Tabular: Raise regression pred_proba #3240
Conversation
Job PR-3240-5413439 is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor nit comments
"""Simple class that holds information on what a problem type is capable of doing""" | ||
def __init__(self, | ||
can_predict: bool, | ||
can_predict_proba: bool, | ||
is_classification: bool): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: params docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
@@ -1338,7 +1346,7 @@ def fit_pseudolabel(self, pseudo_data: pd.DataFrame, max_iter: int = 5, return_p | |||
self.fit_weighted_ensemble() | |||
|
|||
if return_pred_prob: | |||
y_pred_proba = self.predict_proba(pseudo_data) | |||
y_pred_proba = self.predict_proba(pseudo_data) if self.can_predict_proba else self.predict(pseudo_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: split into if-else to have consistency vs other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will keep for now, it will be unified once we apply black in future
Job PR-3240-204271c is done. |
Issue #, if available:
Resolves #2685
Description of changes:
Update
TabularPredictor
to raise an AssertionError whenpredict_proba
andpredict_proba_multi
are called when the problem type isregression
orquantile
. This aligns the logic withMultimodalPredictor
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.