add_lgbm_booster_constr¶
- gurobi_ml.lightgbm.lgbm_regressor.add_lgbm_booster_constr(gp_model, lgbm_booster, input_vars, output_vars=None, epsilon=0.0, **kwargs)¶
Formulate lgbm_booster 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.
Note that only “gbtree” regressors are supported at this point.
- Parameters:
gp_model (
Model) – The gurobipy model where the predictor should be inserted.lgbm_booster (
lightgbm.Booster) – The booster to insert as predictor.input_vars (mvar_array_like) – Decision variables used as input for gradient boosting regressor in gp_model.
output_vars (mvar_array_like, optional) – Decision variables used as output for gradient boosting regressor in gp_model.
epsilon (float, optional) – Small value used to impose strict inequalities for splitting nodes in MIP formulations.
- Returns:
Object containing information about what was added to gp_model to formulate gradient_boosting_regressor.
- Return type:
LightGBMRegressorConstr
Notes
See
add_predictor_constrfor acceptable values for input_vars and output_varsAlso see
gurobi_ml.sklearn.decision_tree_regressor.add_decision_tree_regressor_constr()for specific parameters to model decision tree estimators.- Raises:
ModelConfigurationError – If the booster is not of type “gbtree”.