Skip to content

Commit

Permalink
Update MyModelWrapper so that sklearn recognizes as a classifier. (#…
Browse files Browse the repository at this point in the history
…2751)

* Update scorers.py

Update `MyModelWrapper` so that sklearn recognizes as a classifier.

* trigger checks

* Update deepchecks/tabular/metric_utils/scorers.py

---------

Co-authored-by: Noam Bressler <noamzbr@gmail.com>
  • Loading branch information
chris-santiago and noamzbr committed Feb 22, 2024
1 parent 44b1e3f commit 24ae344
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deepchecks/tabular/metric_utils/scorers.py
Expand Up @@ -261,6 +261,7 @@ def __init__(self, user_model, model_classes, data):
if len(data) > 1:
predictions = predictions.squeeze()
self.predictions = pd.Series(predictions, index=data.index)
self._estimator_type = 'classifier'

def predict(self, data: pd.DataFrame) -> np.ndarray:
"""Convert labels to 0/1 if model is a binary classifier."""
Expand Down

0 comments on commit 24ae344

Please sign in to comment.