pyepo.twostage.sklearnpred ========================== .. py:module:: pyepo.twostage.sklearnpred .. autoapi-nested-parse:: Two-stage model with Scikit-learn predictor Functions --------- .. autoapisummary:: pyepo.twostage.sklearnpred.sklearnPred Module Contents --------------- .. py:function:: 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. :param pmodel: a scikit-learn single-output regression estimator :returns: scikit-learn multi-output regression wrapper :rtype: MultiOutputRegressor