8629c324fa9cdbb00a6a8c2ebba9841307f3a73d,pyod/test/test_knn.py,TestKnn,setUp,#TestKnn#,15
Before Change
class TestKnn(unittest.TestCase):
def setUp(self):
self.X_train, self.y_train, _, self.X_test, self.y_test, _ = generate_data(
n_train=100, n_test=50, contamination=0.05)
def test_knn(self):
clf = Knn(contamination=0.05)
clf.fit(self.X_train)
After Change
class TestKnn(unittest.TestCase):
def setUp(self):
self.n_train = 100
self.n_test = 50
self.contamination = 0.1
self.roc_floor = 0.6
self.X_train, self.y_train, _, self.X_test, self.y_test, _ = generate_data(
n_train=self.n_train, n_test=self.n_test,
contamination=self.contamination)
self.clf = clf = Knn(contamination=self.contamination)
self.clf.fit(self.X_train)
def test_parameters(self):
if not hasattr(self.clf, "decision_scores"):
self.assertRaises(AttributeError, "decision_scores is not set")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 24
Instances
Project Name: yzhao062/pyod
Commit Name: 8629c324fa9cdbb00a6a8c2ebba9841307f3a73d
Time: 2018-05-24
Author: yuezhao@cs.toronto.edu
File Name: pyod/test/test_knn.py
Class Name: TestKnn
Method Name: setUp
Project Name: yzhao062/pyod
Commit Name: 8629c324fa9cdbb00a6a8c2ebba9841307f3a73d
Time: 2018-05-24
Author: yuezhao@cs.toronto.edu
File Name: pyod/test/test_knn.py
Class Name: TestKnn
Method Name: setUp
Project Name: yzhao062/pyod
Commit Name: 8629c324fa9cdbb00a6a8c2ebba9841307f3a73d
Time: 2018-05-24
Author: yuezhao@cs.toronto.edu
File Name: pyod/test/test_hbos.py
Class Name: TestHBOS
Method Name: setUp
Project Name: yzhao062/pyod
Commit Name: 8629c324fa9cdbb00a6a8c2ebba9841307f3a73d
Time: 2018-05-24
Author: yuezhao@cs.toronto.edu
File Name: pyod/test/test_abod.py
Class Name: TestABOD
Method Name: setUp