Skip to content

Commit

Permalink
Add Multiplicative Models/Seasonals #178.
Browse files Browse the repository at this point in the history
Updated Optons. Only additive models are activated by default
  • Loading branch information
antoinecarme committed Mar 5, 2022
1 parent 957b64f commit 567cd4b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pyaf/TS/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 567cd4b

Please sign in to comment.