Beispiel #1
0
 def test_partial_fit(self):
   X = np.array([[1,1], [0,0]])
   y = np.array([1,2])
   regression = NearestNeighborsRegression()
   self.assertTrue(regression.clf_ is None)
   self.assertEqual(regression.fitted_, False)
   regression.partial_fit(X, y)
   self.assertTrue(regression.clf_ is not None)
   self.assertEqual(regression.fitted_, True)
   regression.stop()
 def test_partial_fit(self):
     X = np.array([[1, 1], [0, 0]])
     y = np.array([1, 2])
     regression = NearestNeighborsRegression()
     self.assertTrue(regression.clf_ is None)
     self.assertEqual(regression.fitted_, False)
     regression.partial_fit(X, y)
     self.assertTrue(regression.clf_ is not None)
     self.assertEqual(regression.fitted_, True)
     regression.stop()
Beispiel #3
0
 def test_simple(self):
   regression = NearestNeighborsRegression()
   regression.stop()
 def test_simple(self):
     regression = NearestNeighborsRegression()
     regression.stop()