예제 #1
0
 def test_predict_logic(self):
     model = BiasedRFClassifier(k_nearest_neighbor=5)
     model.fit(self.x, self.imbalance_y)
     pred = model.predict(self.x)
     self.assertEqual(len(self.imbalance_y), len(pred))
     print(pred)
예제 #2
0
 def test_fit_logic(self):
     model = BiasedRFClassifier(k_nearest_neighbor=5)
     model.fit(self.x, self.imbalance_y)
     self.assertTrue(model._is_fitted())