def test_train_and_predict(self):
        x = pd.DataFrame([[-1], [-5], [1], [5]])
        y = pd.Series([0, 0, 1, 1])
        model = ClassicalModel(2,
                               GradientBoostingClassifier,
                               clf_params={
                                   "n_estimators": 1,
                                   "max_depth": 1
                               })

        model.train(x, y)
        y_pred = pd.Series(model.predict(x))

        self.assertTrue(y.equals(y_pred))
    def test_score(self):
        x = pd.DataFrame([[-1], [-5], [1], [5]])
        y = pd.Series([0, 0, 1, 2])
        model = ClassicalModel(2,
                               GradientBoostingClassifier,
                               clf_params={
                                   "n_estimators": 1,
                                   "max_depth": 1
                               },
                               label_mapper=lambda x: x > 0)

        model.train(x, y)
        score = model.score(x, y)
        y_pred = pd.Series(model.predict(x))
        self.assertTrue(y_pred.equals(pd.Series([False, False, True, True])))

        self.assertEqual(score, 1)