Skip to content

Commit

Permalink
Adding test to show #89 is indeed a problem
Browse files Browse the repository at this point in the history
  • Loading branch information
luizgh committed Sep 18, 2018
1 parent 9f152c7 commit 44c9bec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deslib/tests/test_des_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@
from deslib.static.oracle import Oracle
from deslib.static.single_best import SingleBest
from deslib.static.static_selection import StaticSelection
from sklearn.model_selection import GridSearchCV


def test_grid_search():
# This tests if the estimator can be cloned and used in a grid search

pool_classifiers, X_dsel, y_dsel, X_test, y_test = setup_classifiers()

kne = KNORAE(pool_classifiers)

params = {'k': [1, 3, 5, 7]}
grid = GridSearchCV(kne, params)

grid.fit(X_dsel, y_dsel)

grid.best_estimator_.score(X_test, y_test)


def test_label_encoder_integration_list_classifiers():
Expand Down

0 comments on commit 44c9bec

Please sign in to comment.