gurobi_ml.lightgbm.lgbm_regressor.add_lgbmregressor_constr(gp_model, lgbm_regressor, input_vars, output_vars=None, epsilon=0.0, **kwargs)#

Formulate lgbm_regressor into gp_model.

The formulation predicts the values of output_vars using input_vars according to lgbm_regressor. See our User’s Guide for details on the mip formulation used.

This version is for using directly with the Scikit-Learn wrapper of lgbm. Note that only “gbtree” regressors are supported at this point.

  • gp_model (gurobipy model) – The gurobipy model where the predictor should be inserted.

  • lgbm_regressor (lightgbm.sklearn.LGBMRegressor) – The gradient boosting regressor to insert as predictor.

  • input_vars (mvar_array_like) – Decision variables used as input for gradient boosting regressor in model.

  • output_vars (mvar_array_like, optional) – Decision variables used as output for gradient boosting regressor in model.


Object containing information about what was added to gp_model to formulate gradient_boosting_regressor.

Return type:



See add_predictor_constr for acceptable values for input_vars and output_vars

Also see gurobi_ml.sklearn.decision_tree_regressor.add_decision_tree_regressor() for specific parameters to model decision tree estimators.


NoModel – If the booster is not of type “gbtree”.