Skip to content

Commit f547a8d

Browse files
committed
modAL.models .fit() now returns self for all objects
1 parent adf9cb1 commit f547a8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modAL/models.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ def fit(self, X, y, bootstrap=False, **fit_kwargs):
155155
"""
156156
self.X_training = X
157157
self.y_training = y
158-
self._fit_to_known(bootstrap=bootstrap, **fit_kwargs)
159-
return self
158+
return self._fit_to_known(bootstrap=bootstrap, **fit_kwargs)
160159

161160
def predict(self, X, **predict_kwargs):
162161
"""
@@ -619,6 +618,8 @@ def fit(self, X, y, **fit_kwargs):
619618
for learner in self.learner_list:
620619
learner.fit(X, y, **fit_kwargs)
621620

621+
return self
622+
622623
def query(self, X, **query_kwargs):
623624
"""
624625
Finds the n_instances most informative point in the data provided by calling

0 commit comments

Comments
 (0)