Skip to content

Commit

Permalink
2.0.0 dev (#121)
Browse files Browse the repository at this point in the history
* requirements update

* minor change

* minor changes

* initial index commit

* attribute redirection

* minor change

* blank line
  • Loading branch information
jrzkaminski authored Jul 8, 2024
1 parent d89e91d commit 638b792
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bamt/core/node_models/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ def predict_proba(self, X: np.ndarray) -> np.ndarray:

def __str__(self):
return str(self._classifier)

def __getattr__(self, name: str):
if self._classifier:
return getattr(self._classifier, name)
raise AttributeError(
f"'{self.__class__.__name__}' object has no attribute '{name}'"
)
7 changes: 7 additions & 0 deletions bamt/core/node_models/regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ def predict_proba(self, X: np.ndarray) -> np.ndarray:

def __str__(self):
return str(self._regressor)

def __getattr__(self, name: str):
if self._regressor:
return getattr(self._regressor, name)
raise AttributeError(
f"'{self.__class__.__name__}' object has no attribute '{name}'"
)

0 comments on commit 638b792

Please sign in to comment.