Skip to content

Commit

Permalink
moved fitted_ after function call (#77)
Browse files Browse the repository at this point in the history
* moved fitted_ after function call

* also moved fitted_ after function call in outlier
  • Loading branch information
Proteusiq authored Mar 31, 2023
1 parent 97a80ed commit a928a09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hulearn/classification/functionclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ def fit(self, X, y):
Fit the classifier. No-Op.
"""
# Run it to confirm no error happened.
self.fitted_ = True
_ = self.func(X, **self.kwargs)
self.fitted_ = True
return self

def partial_fit(self, X, y, classes=None, sample_weight=None):
"""
Fit the classifier partially. No-Op.
"""
# Run it to confirm no error happened.
self.fitted_ = True
_ = self.func(X, **self.kwargs)
self.fitted_ = True
return self

def predict(self, X):
Expand Down
2 changes: 1 addition & 1 deletion hulearn/outlier/functionoutlier.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def fit(self, X, y=None):
Fit the classifier. No-Op.
"""
# Run it to confirm no error happened.
self.fitted_ = True
_ = self.func(X, **self.kwargs)
self.fitted_ = True
return self

def partial_fit(self, X, y=None):
Expand Down

0 comments on commit a928a09

Please sign in to comment.