Linear Regression Constraint

Module for inserting ordinary Scikit-Learn regression models into a PySCIPOpt Model.

The following linear models are tested and should work:
pyscipopt_ml.sklearn.add_linear_regression_constr(scip_model, linear_regression, input_vars, output_vars=None, unique_naming_prefix='', **kwargs)

Formulate linear_regression as a constraint in a PySCIPOpt Model.

The formulation predicts the values of output_vars using input_vars according to linear_regression.

Parameters:
Returns:

Object containing information about what was added to scip to formulate linear_regression.

Return type:

LinearRegressionConstr

Note

See add_predictor_constr for acceptable values for input_vars and output_vars

class pyscipopt_ml.sklearn.linear_regression.LinearRegressionConstr(scip_model, predictor, input_vars, output_vars=None, unique_naming_prefix='', **kwargs)

Class to model trained sklearn.linear_model.LinearRegression with SCIP

Stores the changes to the SCIP Model for representing an instance into it. Inherits from AbstractPredictorConstr..