mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Fix docstrings regarding variables that should not be predicted
This commit is contained in:
@@ -59,11 +59,18 @@ class Instance(ABC):
|
|||||||
provide as variable features the weight and the price of a specific item.
|
provide as variable features the weight and the price of a specific item.
|
||||||
|
|
||||||
Like instance features, the arrays returned by this method MUST have the same length for
|
Like instance features, the arrays returned by this method MUST have the same length for
|
||||||
all variables, and for all relevant instances of the problem.
|
all variables within the same category, for all relevant instances of the problem.
|
||||||
|
|
||||||
If the value of the given variable should not be predicted, this method MUST return None.
|
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_variable_category(self, var, index):
|
def get_variable_category(self, var, index):
|
||||||
|
"""
|
||||||
|
Returns a category (a string, an integer or any hashable type) for each decision variable.
|
||||||
|
|
||||||
|
If two variables have the same category, LearningSolver will use the same internal ML model
|
||||||
|
to predict the values of both variables. By default, all variables belong to the "default"
|
||||||
|
category, and therefore only one ML model is used for all variables.
|
||||||
|
|
||||||
|
If the returned category is None, ML models will ignore the variable.
|
||||||
|
"""
|
||||||
return "default"
|
return "default"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
site_name: MIPLearn
|
site_name: MIPLearn
|
||||||
theme: cinder
|
theme: cinder
|
||||||
copyright: Copyright (C) 2019-2020 Argonne National Laboratory
|
copyright: "© Copyright 2019–2020 Argonne National Laboratory"
|
||||||
repo_url: https://github.com/iSoron/miplearn
|
repo_url: https://github.com/iSoron/miplearn
|
||||||
nav:
|
nav:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
|
|||||||
Reference in New Issue
Block a user