예제 #1
0
 def test_score_samples_trained_trainable(self):
     clf = IsolationForest()
     clf.fit(self.X_train)
     with self.assertWarns(DeprecationWarning):
         clf.score_samples(self.X_test)
예제 #2
0
 def test_score_samples_trainable(self):
     clf = IsolationForest()
     with self.assertRaises(ValueError):
         clf.score_samples(self.X_test)