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)
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)