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 calling Expr.skb.get_grid_search() or Expr.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.

get_params(deep=True)[source]#

Get parameters for this estimator.

Parameters:
deepbool, default=True

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:
paramsdict

Parameter names mapped to their values.

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:
colorscalestr, optional

A colorscale name understood by plotly.

min_scorefloat, 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.

Returns:
Plotly Figure
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:
**paramsdict

Estimator parameters.

Returns:
selfestimator instance

Estimator instance.