pyepo.twostage.sklearnpred

Two-stage model with Scikit-learn predictor

Functions

sklearnPred(→ sklearn.multioutput.MultiOutputRegressor)

Wrap a scikit-learn estimator into a multi-output regressor for two-stage baselines.

Module Contents

pyepo.twostage.sklearnpred.sklearnPred(pmodel: sklearn.base.BaseEstimator) sklearn.multioutput.MultiOutputRegressor

Wrap a scikit-learn estimator into a multi-output regressor for two-stage baselines.

The two-stage approach trains a regression model to minimize prediction error (e.g. MSE on cost coefficients) and only afterwards plugs the predicted costs into the optimization solver. This helper turns any single-output scikit-learn estimator (LinearRegression, RandomForestRegressor, MLPRegressor, …) into a multi-output regressor suitable for predicting the full cost vector.

Parameters:

pmodel – a scikit-learn single-output regression estimator

Returns:

scikit-learn multi-output regression wrapper

Return type:

MultiOutputRegressor