summaryrefslogtreecommitdiff
path: root/lib/parameters.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parameters.py')
-rw-r--r--lib/parameters.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/parameters.py b/lib/parameters.py
index 078fa7a..d216de9 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -439,6 +439,18 @@ class ParamStats:
def __init__(self, data):
self.__dict__.update(data)
+ @classmethod
+ def compute_for_attr(cls, attr, use_corrcoef=False):
+ res = _compute_param_statistics(
+ attr.data,
+ attr.param_names,
+ attr.param_values,
+ arg_count=attr.arg_count,
+ use_corrcoef=use_corrcoef,
+ )
+ attr.by_param = res.pop("by_param")
+ attr.stats = cls(res)
+
def can_be_fitted(self) -> bool:
"""
Return whether a sufficient amount of distinct numeric parameter values is available, allowing a parameter-aware model to be generated.