Custom extensions of sklearn functionalities

Custom expansions of sklearn functionalities.

Note

This module provides custom expansions of some sklearn classes and functions which are necessary to fit the purposes for the desired functionalities of the MLR module. As long-term goal we would like to include these functionalities to the sklearn package since we believe these additions might be helpful for everyone. This module serves as interim solution. To ensure that all features are properly working this module is also covered by tests, which will also be expanded in the future.

Functions

cross_val_score_weighted(estimator, x_data)

Expand sklearn.model_selection.cross_val_score().

get_rfecv_transformer(rfecv_estimator)

Get transformer step of RFECV estimator.

perform_efecv(estimator, x_data, y_data, …)

Perform exhaustive feature selection.

esmvaltool.diag_scripts.mlr.custom_sklearn.cross_val_score_weighted(estimator, x_data, y_data=None, groups=None, scoring=None, cv=None, n_jobs=None, verbose=0, fit_params=None, pre_dispatch='2*n_jobs', error_score=nan, sample_weights=None)[source]

Expand sklearn.model_selection.cross_val_score().

esmvaltool.diag_scripts.mlr.custom_sklearn.get_rfecv_transformer(rfecv_estimator)[source]

Get transformer step of RFECV estimator.

esmvaltool.diag_scripts.mlr.custom_sklearn.perform_efecv(estimator, x_data, y_data, **kwargs)[source]

Perform exhaustive feature selection.