summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-02-22 10:11:09 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-02-22 10:11:09 +0100
commit677d24805b0bd50fc9326c43c4153a93d8592a41 (patch)
tree919d5101d79944f4a4d0bcc5b3859cc11f4efe6c
parent37f5fa6c5d33a6f04a65cf6e6f9c01ffab897f9b (diff)
Replace DFATOOL_RMT_FUNCTION_LEAVES=0 with DFATOOL_RMT_SUBMODEL=static
-rw-r--r--README.md3
-rw-r--r--doc/modeling-method.md2
-rw-r--r--lib/functions.py2
-rw-r--r--lib/parameters.py9
4 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index a60562a..274e121 100644
--- a/README.md
+++ b/README.md
@@ -112,9 +112,8 @@ The following variables may be set to alter the behaviour of dfatool components.
| `DFATOOL_COMPENSATE_DRIFT` | **0**, 1 | Perform drift compensation for loaders without sync input (e.g. EnergyTrace or Keysight) |
| `DFATOOL_DRIFT_COMPENSATION_PENALTY` | 0 .. 100 (default: majority vote over several penalties) | Specify penalty for ruptures.py PELT changepoint petection |
| `DFATOOL_MODEL` | cart, decart, fol, lmt, **rmt**, symreg, xgb | Modeling method. See below for method-specific configuration options. |
-| `DFATOOL_SUBMODEL` | fol, **uls** | Modeling method for RMT leaf functions. |
+| `DFATOOL_RMT_SUBMODEL` | fol, static, **uls** | Modeling method for RMT leaf functions. |
| `DFATOOL_RMT_ENABLED` | 0, **1** | Use decision trees in get\_fitted |
-| `DFATOOL_RMT_FUNCTION_LEAVES` | 0, **1** | Use functions (fitted via linear regression) in decision tree leaves when modeling numeric parameters with at least three distinct values. If 0, integer parameters are treated as enums instead. |
| `DFATOOL_CART_MAX_DEPTH` | **0** .. *n* | maximum depth for sklearn CART. Default (0): unlimited. |
| `DFATOOL_LMT_MAX_DEPTH` | **5** .. 20 | Maximum depth for LMT. |
| `DFATOOL_LMT_MIN_SAMPLES_SPLIT` | 0.0 .. 1.0, **6** .. *n* | Minimum samples required to still perform an LMT split. A value below 1.0 sets the specified ratio of the total number of training samples as minimum. |
diff --git a/doc/modeling-method.md b/doc/modeling-method.md
index 057f7ee..bd0a15d 100644
--- a/doc/modeling-method.md
+++ b/doc/modeling-method.md
@@ -44,7 +44,7 @@ All of these are valid regression model trees.
* `--force-tree` builds a tree structure even if dfatool's heuristic indicates that no non-integer parameter affects the modeled performance attribute.
* `DFATOOL_RMT_IGNORE_IRRELEVANT_PARAMS=0` disables the relevant parameter detection heuristic when building the tree structure. By default, irrelevant parameters cannot end up as decision nodes.
-* `DFATOOL_SUBMODEL=fol` makes RMT only consider linear functions (a + bx) in regression analysis. Useful for comparison with LMT / M5.
+* `DFATOOL_RMT_SUBMODEL=fol` makes RMT only consider linear functions (a + bx) in regression analysis. Useful for comparison with LMT / M5.
* `DFATOOL_PARAM_CATEGORICAL_TO_SCALAR=1`
* `DFATOOL_ULS_SKIP_CODEPENDENT_CHECK=1`
* `DFATOOL_REGRESSION_SAFE_FUNCTIONS=1`
diff --git a/lib/functions.py b/lib/functions.py
index 07f1823..c6ea283 100644
--- a/lib/functions.py
+++ b/lib/functions.py
@@ -1844,7 +1844,7 @@ class analytic:
repr_str="β₀ + β₁ * safe_sqrt(x)",
)
- if os.getenv("DFATOOL_SUBMODEL", "uls") == "fol":
+ if os.getenv("DFATOOL_RMT_SUBMODEL", "uls") == "fol":
functions = {"linear": functions["linear"]}
return functions
diff --git a/lib/parameters.py b/lib/parameters.py
index bafc2a5..acc77d4 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -598,7 +598,7 @@ 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.
- # Exceptions such as DFATOOL_SUBMODEL=fol (2 values sufficient)
+ # Exceptions such as DFATOOL_RMT_SUBMODEL=fol (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")
@@ -1031,9 +1031,10 @@ class ModelAttribute:
"""
if with_function_leaves is None:
- with_function_leaves = bool(
- int(os.getenv("DFATOOL_RMT_FUNCTION_LEAVES", "1"))
- )
+ if os.getenv("DFATOOL_RMT_SUBMODEL", "uls") == "static":
+ with_function_leaves = False
+ else:
+ with_function_leaves = True
if with_nonbinary_nodes is None:
with_nonbinary_nodes = bool(
int(os.getenv("DFATOOL_RMT_NONBINARY_NODES", "1"))