diff --git a/miplearn/instance.py b/miplearn/instance.py index a90744f..a401e3a 100644 --- a/miplearn/instance.py +++ b/miplearn/instance.py @@ -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" diff --git a/mkdocs.yml b/mkdocs.yml index 5d0c202..e0dc1f2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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