Skip to content

Instantly share code, notes, and snippets.

@matsuken92
Last active May 11, 2019 14:07
Show Gist options
  • Save matsuken92/aa5dc9ed8215426feb35206715b6a46e to your computer and use it in GitHub Desktop.
Save matsuken92/aa5dc9ed8215426feb35206715b6a46e to your computer and use it in GitHub Desktop.
Demonstration of hidden class ParameterGrid on sklearn.
from sklearn.model_selection._search import ParameterGrid
param_grid = {
"metric_list" : [None, "None", "binary_logloss", "auc", ["binary_logloss"], ["auc"],
['binary_logloss','auc', ], ['auc', 'binary_logloss',] ],
"first_metric_only": [True, False],
"eval_train_metric": [True, False],
}
pg = ParameterGrid(param_grid)
# displaying all pattern of the parameter combination.
for p in pg:
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment