Skip to content

Commit

Permalink
add estimator type
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w-feldmann committed May 4, 2024
1 parent 69134bd commit 7ed4b24
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions molpipeline/estimators/chemprop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ def classes_(self) -> npt.NDArray[np.int_]:
raise ValueError("Classes are not set.")
return self._classes_

@property
def _estimator_type(self) -> str:
"""Return the estimator type.
Returns
-------
str
The estimator type.
"""
if self._is_classifier():
return "classifier"
return "regressor"

def _is_binary_classifier(self) -> bool:
"""Check if the model is a binary classifier.
Expand Down

0 comments on commit 7ed4b24

Please sign in to comment.