From 567cd4bcc33a75c613b03d4686d1a0ef478e69e3 Mon Sep 17 00:00:00 2001 From: Antoine Carme Date: Sat, 5 Mar 2022 17:21:12 +0100 Subject: [PATCH] Add Multiplicative Models/Seasonals #178. Updated Optons. Only additive models are activated by default --- pyaf/TS/Options.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyaf/TS/Options.py b/pyaf/TS/Options.py index cdc00036d..735f86b5b 100644 --- a/pyaf/TS/Options.py +++ b/pyaf/TS/Options.py @@ -15,6 +15,9 @@ def __init__(self): self.mActivePeriodics = {}; self.mActiveTrends = {}; self.mActiveAutoRegressions = {}; + # Add Multiplicative Models/Seasonals #178 + self.mActiveDecompositionTypes = {} + self.mKnownDecompositionTypes = ['T+S+R', 'TS+R', 'TSR'] self.mKnownTransformations = ['None', 'Difference', 'RelativeDifference', 'Integration', 'BoxCox', 'Quantization', 'Logit', @@ -50,7 +53,21 @@ def __init__(self): self.set_active_trends(self.mKnownTrends[0:4]); self.set_active_periodics(self.mKnownPeriodics); self.set_active_autoregressions(self.mKnownAutoRegressions[0:3]); + # Add Multiplicative Models/Seasonals #178. + # Only additive models are activated by default + self.set_active_decopomposition_types(['T+S+R']); + def set_active_decopomposition_types(self, iDecompTypes): + self.mActiveDecompositionTypes = {}; + for decomp_type in self.mKnownDecompositionTypes: + if(decomp_type in iDecompTypes): + self.mActiveDecompositionTypes[decomp_type] = True; + else: + self.mActiveDecompositionTypes[decomp_type] = False; + if(True not in self.mActiveDecompositionTypes.values()): + # default + self.mActiveTransformations['T+S+R'] = True; + def set_active_transformations(self, transformations): self.mActiveTransformations = {}; for transformation in self.mKnownTransformations: