Fix docstrings regarding variables that should not be predicted

This commit is contained in:
2020-01-30 13:22:17 -06:00
parent 25ba23a58d
commit 46298db097
2 changed files with 11 additions and 4 deletions

View File

@@ -59,11 +59,18 @@ class Instance(ABC):
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
all variables, and for all relevant instances of the problem.
If the value of the given variable should not be predicted, this method MUST return None.
all variables within the same category, for all relevant instances of the problem.
"""
pass
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"

View File

@@ -1,6 +1,6 @@
site_name: MIPLearn
theme: cinder
copyright: Copyright (C) 2019-2020 Argonne National Laboratory
copyright: "© Copyright 2019–2020 Argonne National Laboratory"
repo_url: https://github.com/iSoron/miplearn
nav:
- Home: index.md