ParamSearch#
- class skrub.ParamSearch(expr, search)[source]#
Pipeline that evaluates a skrub expression with hyperparameter tuning.
This class is not meant to be instantiated manually,
ParamSearch
objects are created by callingExpr.skb.get_grid_search()
orExpr.skb.get_randomized_search()
on an expression.- Attributes:
detailed_results_
More detailed cross-validation results table.
results_
Cross-validation results containing parameters and scores in a dataframe.
Methods
get_params
([deep])Get parameters for this estimator.
plot_results
(*[, colorscale, min_score])Create a parallel coordinate plot of the cross-validation results.
set_params
(**params)Set the parameters of this estimator.
fit
- property detailed_results_#
More detailed cross-validation results table.
Similar to
results_
but also contains the standard deviation of scores across folds, the scores on training data, and the fit and score durations.
- plot_results(*, colorscale='bluered', min_score=None)[source]#
Create a parallel coordinate plot of the cross-validation results.
Plotly must be installed to use this method.
- Parameters:
- colorscale
str
, optional A colorscale name understood by plotly.
- min_score
float
, optional Lines for models that have a score lower than
min_score
are not displayed, and the color scale lower bound is adjusted accordingly. This is useful when we are only interested in the models that perform well, to make the plot less cluttered and to make better use of the colorscale’s range.
- colorscale
- Returns:
- Plotly
Figure
- Plotly
- property results_#
Cross-validation results containing parameters and scores in a dataframe.
- set_params(**params)[source]#
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline
). The latter have parameters of the form<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters:
- **params
dict
Estimator parameters.
- **params
- Returns:
- selfestimator instance
Estimator instance.