diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-01-12 09:24:23 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-01-12 09:24:23 +0100 |
commit | c3043d8537e4dceb303929582dab92a6024924ce (patch) | |
tree | 952cf10ea377e45d56436c7282d6dd925774c720 /lib | |
parent | 2cdc0ebc4a68d44dd6381d7fd473455f1d2f1b5d (diff) |
Expose DFATOOL_ULS_MIN_DISTINCT_VALUES training hyper-parameter
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parameters.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/parameters.py b/lib/parameters.py index 74be565..3173784 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -604,7 +604,11 @@ class ModelAttribute: # There must be at least 3 distinct data values (≠ None) if an analytic model # is to be fitted. For 2 (or fewer) values, decision trees are better. - self.min_values_for_analytic_model = 3 + # Exceptions such as DFATOOL_FIT_LINEAR_ONLY=1 (2 values sufficient) + # can be handled via DFATOOL_ULS_MIN_DISTINCT_VALUES + self.min_values_for_analytic_model = int( + os.getenv("DFATOOL_ULS_MIN_DISTINCT_VALUES", "3") + ) def __repr__(self): mean = np.mean(self.data) |