Exemplo n.º 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()
Exemplo n.º 2
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()
Exemplo n.º 3
0
 def test_simple(self):
   regression = NearestNeighborsRegression()
   regression.stop()
Exemplo n.º 4
0
 def test_simple(self):
     regression = NearestNeighborsRegression()
     regression.stop()