def test_basic_predict_bad_valid(self): c = self.make_config(target='2a_plus_b_valid_diff') preds = models.predict(self.ds, c, self.ds.validation_index, self.ds.train_index) mse = ((self.ds._data['2a_plus_b_valid_diff'].ix[self.ds.validation_index] - preds) ** 2).mean() print mse self.assertTrue( 800 > mse > 200)
def test_basic_predict_relationship(self): c = self.make_config(target='2a_plus_b') preds = models.predict(self.ds, c, self.ds.validation_index, self.ds.train_index) mse = ((self.ds._data['2a_plus_b'].ix[self.ds.validation_index] - preds) ** 2).mean() print mse self.assertAlmostEqual(mse, 0)