summaryrefslogtreecommitdiff
path: root/lib/model.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-03-16 08:38:24 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-03-16 08:38:24 +0100
commit162a0c287f5dab664e9168a60d76c9f8da07e46a (patch)
tree1c9ffba567b7d93e5fc33c73180842fc3d174bc5 /lib/model.py
parent924b96a1852faffddb24b01723833b6356d01c98 (diff)
move codependent parameter detection to Model / ModelAttribute
Still TODO: Ignore codependent parameters when partitioning data for analytic modeling / regression
Diffstat (limited to 'lib/model.py')
-rw-r--r--lib/model.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/model.py b/lib/model.py
index 829ca37..75f7195 100644
--- a/lib/model.py
+++ b/lib/model.py
@@ -5,7 +5,7 @@ import numpy as np
import os
from .automata import PTA, ModelAttribute
from .functions import StaticFunction, SubstateFunction
-from .parameters import ParallelParamStats
+from .parameters import ParallelParamStats, codependent_param_dict
from .paramfit import ParallelParamFit
from .utils import soft_cast_int, by_name_to_by_param, regression_measures
@@ -126,10 +126,12 @@ class AnalyticModel:
return f"AnalyticModel<names=[{names}]>"
def _compute_stats(self, by_name):
+
paramstats = ParallelParamStats()
for name, data in by_name.items():
self.attr_by_name[name] = dict()
+ codependent_param = codependent_param_dict(data["param"])
for attr in data["attributes"]:
model_attr = ModelAttribute(
name,
@@ -138,6 +140,7 @@ class AnalyticModel:
data["param"],
self.parameters,
self._num_args.get(name, 0),
+ codependent_param=codependent_param,
)
self.attr_by_name[name][attr] = model_attr
paramstats.enqueue((name, attr), model_attr)