API

Main Function

The main function provided by the package formulates a predictor in a Gurobi model. In most cases, it is the only function needed from the package.

Some formulations of the predictors can have additional options those are documented in the specific functions for each regression model.

add_predictor_constr(gp_model, predictor, ...)

Formulate predictor in gp_model.

Scikit-learn API

column_transformer

Module for formulating a sklearn.compose.ColumnTransformer in a gurobipy model.

decision_tree_regressor

Module for formulating a sklearn.tree.DecisionTreeRegressor in a Model.

gradient_boosting_regressor

Module for formulating a sklearn.ensemble.GradientBoostingRegressor into a Model.

linear_regression

Module for formulating ordinary regression models into a Model.

logistic_regression

Module for formulating a sklearn.linear_model.LogisticRegression in a Model.

mlpregressor

Module for formulating a sklearn.neural_network.MLPRegressor in a Model.

pipeline

Module for formulating a sklearn.pipeline.Pipeline in a Model.

pls_regression

Module for formulating sklearn.cross_decomposition.PLSRegression in a gurobipy model.

random_forest_regressor

Module for formulating a sklearn.ensemble.RandomForestRegressor into a Model.

preprocessing

Implementation for using sklearn preprocessing object in a Guobi model.

Keras API

keras

Module for formulating a Keras model into a Model.

PyTorch API

sequential

Module for formulating torch.nn.Sequential model in a Model.

XGBoost API

xgboost_regressor

Module for formulating a XGBoost gradient boosting regressor into a Model.

LightGBM API

lgbm_regressor

Module for formulating a LightGBM gradient boosting regressor into a Model.


Internal APIs