summaryrefslogtreecommitdiff
path: root/lib/dfatool.py
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-01 10:14:14 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-01 10:14:14 +0200
commit8a0beef6c0312f2a0d83a69d747c39549826d588 (patch)
tree52cdf485cae1f271848672bad688ae768f384eed /lib/dfatool.py
parentd894837abb7d750b8149f27dc7c99ff17780718a (diff)
AnalyticModel: Add argument support
Diffstat (limited to 'lib/dfatool.py')
-rwxr-xr-xlib/dfatool.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py
index 1712d75..1802acf 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -1036,10 +1036,17 @@ class AnalyticModel:
ratio = self.stats.param_dependence_ratio(name, attribute, param)
if self.stats.depends_on_param(name, attribute, param):
paramfit.enqueue(name, attribute, param_index, param, False)
+ if arg_support_enabled and name in self._num_args:
+ for arg_index in range(self._num_args[name]):
+ if self.stats.depends_on_arg(name, attribute, arg_index):
+ paramfit.enqueue(name, attribute, len(self.parameters) + arg_index, arg_index, False)
paramfit.fit()
for name in self.by_name.keys():
+ num_args = 0
+ if name in self._num_args:
+ num_args = self._num_args[name]
for attribute in self.by_name[name]['attributes']:
fit_result = {}
for result in paramfit.results:
@@ -1058,7 +1065,7 @@ class AnalyticModel:
fit_result[result['key'][2]] = this_result
if len(fit_result.keys()):
- x = analytic.function_powerset(fit_result, self.parameters)
+ x = analytic.function_powerset(fit_result, self.parameters, num_args)
x.fit(self.by_param, name, attribute)
if x.fit_success: