Пример #1
0
 def test_cross_validate_factory(self):
     folds = 3
     n_models = 2
     cvcresult = cv_factory(self.data,
                           folds=folds,
                           features=[[F(10), F('a')]],
                           target=[F('b'), F('a')],
                           estimator=[linear_model.LinearRegression()])
     self.assertEqual(len(cvcresult.cvresults), n_models)
Пример #2
0
 def test_cross_validate_factory(self):
     outcomes = cv_factory(
         self.data,
         folds=3,
         features=[[F(10), F("a")]],
         target=[F("b"), F("a")],
         estimator=[linear_model.LinearRegression()],
     )
     for i in outcomes:
         self.assertEqual(len(outcomes[i]["results"]), 3)