diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-09-07 14:57:39 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-09-07 14:57:39 +0200 |
commit | 8b969f4945e97d811b7a5b27c99b76cf2dd2840b (patch) | |
tree | 68b402ae63953d51d5d10308003b7ce0ea04db71 /lib/model.py | |
parent | 160546a8b11a26c1c56f26b8eff68e455fa9ca1e (diff) | |
parent | ab33810fa92f8a262695077ae9504c836cd3c1a2 (diff) |
Merge branch 'master' into decisiontrees
Diffstat (limited to 'lib/model.py')
-rw-r--r-- | lib/model.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/model.py b/lib/model.py index f53f645..41cf726 100644 --- a/lib/model.py +++ b/lib/model.py @@ -5,6 +5,7 @@ import numpy as np from scipy import optimize from sklearn.metrics import r2_score from multiprocessing import Pool +from .automata import PTA from .functions import analytic from .functions import AnalyticFunction from .parameters import ParamStats @@ -1111,13 +1112,16 @@ class PTAModel: static_quality = self.assess(static_model) param_model, param_info = self.get_fitted() analytic_quality = self.assess(param_model) - self.pta.update( + pta = self.pta + if pta is None: + pta = PTA(self.states(), parameters=self._parameter_names) + pta.update( static_model, param_info, static_error=static_quality["by_name"], analytic_error=analytic_quality["by_name"], ) - return self.pta.to_json() + return pta.to_json() def states(self): """Return sorted list of state names.""" |