Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KulikDM committed Oct 29, 2022
1 parent 03c354b commit 27acab5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyod/models/qmcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, contamination=0.1):

super(QMCD, self).__init__(contamination=contamination)

def fit(self, X, y):
def fit(self, X, y=None):
"""Fit detector
Parameters
Expand Down
3 changes: 2 additions & 1 deletion pyod/test/test_qmcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ def setUp(self):
self.n_test = 200
self.n_features = 2
self.contamination = 0.1
self.roc_floor = 0.8

self.X_train, self.X_test, self.y_train, self.y_test = generate_data(
n_train=self.n_train, n_test=self.n_test,
n_features=self.n_features, contamination=self.contamination,
random_state=42)

self.clf = QMCD(contamination=self.contamination)
self.clf.fit(self.X_train, self.y_train)
self.clf.fit(self.X_train)

def test_parameters(self):
assert (hasattr(self.clf, 'decision_scores_') and
Expand Down

0 comments on commit 27acab5

Please sign in to comment.