add_model_to_gridsearch

hcrystalball.model_selection.add_model_to_gridsearch(model, grid_search)[source]

Extends gridsearch with provided model.

Adds given model or list of models to the gridsearch under ‘model’ step

Parameters
  • model (sklearn compatible model or list of sklearn compatible models) – model(s) to be added to provided grid search

  • grid_search (sklearn.model_selection.GridSearchCV) – grid search, that has ‘model’ step as the last step

Returns

Grid search enriched with given models

Return type

sklearn.model_selection.GridSearchCV