Beispiel #1
0
 def test_cross_validate(self):
     folds = 3
     estimator = linear_model.LinearRegression()
     cvresult = cross_validate(self.data, folds=folds,
                                       features = [F(10), F('a')],
                                       target = F('b'),
                                       estimator = estimator)
     self.assertEqual(len(cvresult.results), folds)
     self.assertEqual(cvresult.model_def.estimator.base_estimator_, estimator)
Beispiel #2
0
 def test_cross_validate(self):
     results, reporters = cross_validate(
         self.data, folds=3, features=[F(10), F("a")], target=F("b"), estimator=linear_model.LinearRegression()
     )
     self.assertEqual(len(results), 3)