diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-06-14 18:10:07 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-06-14 18:10:07 +0200 |
commit | d5375efb96c695071ff5e15ca1cd1e16c6613bbc (patch) | |
tree | 3b77f4e3dd9d2cb465a6f286f5173b8d7b0e69c1 /lib | |
parent | 370650b5fe955b10fede14720130df0af8b452f4 (diff) |
FOLFunction: _really_ add a static component.
370650b5fe955b10fede14720130df0af8b452f4 was incomplete (only considered
the second order part)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/functions.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/functions.py b/lib/functions.py index 52063b8..2b0b6e0 100644 --- a/lib/functions.py +++ b/lib/functions.py @@ -651,12 +651,12 @@ class FOLFunction(ModelFunction): funbuf += f" + regression_arg({num_vars}) * parameter({param_name}) * parameter({self.parameter_names[k]})" num_vars += 1 else: - num_vars = fit_parameters.shape[0] - funbuf = "0" - rawbuf = "0" - for i in range(num_vars): - rawbuf += f" + reg_param[{i}] * model_param[{i}]" - i = 0 + num_vars = fit_parameters.shape[0] + 1 + rawbuf = "reg_param[0]" + for i in range(1, num_vars): + rawbuf += f" + reg_param[{i}] * model_param[{i-1}]" + funbuf = "regression_arg(0)" + i = 1 for j, param_name in enumerate(self.parameter_names): if ignore_index[j]: continue |