Skip to content

Commit 21b29f1

Browse files
committed
add: __getattr__ for BaseLearner implemented
1 parent 37c68bb commit 21b29f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modAL/models/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ def __init__(self,
5959
if X_training is not None:
6060
self._fit_to_known(bootstrap=bootstrap_init, **fit_kwargs)
6161

62+
def __getattr__(self, item):
63+
try:
64+
return getattr(self, item)
65+
except AttributeError:
66+
return getattr(self.estimator, item)
67+
6268
def _add_training_data(self, X: modALinput, y: modALinput) -> None:
6369
"""
6470
Adds the new data and label to the known data, but does not retrain the model.

0 commit comments

Comments
 (0)