Skip to content

Commit

Permalink
algo: remove day feature for minute freq in tsf
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Zhu <zzqshu@126.com>
  • Loading branch information
zqzten committed Jan 9, 2024
1 parent ad417e9 commit d92968d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions algorithm/kapacity/timeseries/forecasting/forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def __init__(self,
self.seq_len = self.config['context_length'] + self.config['prediction_length']
self.config = config
self.features_map = {
'min': ['minute', 'hour', 'dayofweek'],
'1min': ['minute', 'hour', 'dayofweek'],
'10min': ['minute', 'hour', 'dayofweek', 'day'],
'H': ['hour', 'dayofweek', 'day'],
'1H': ['hour', 'dayofweek', 'day'],
'min': ['minute', 'hour', 'dayofweek', 'day'],
'1min': ['minute', 'hour', 'dayofweek', 'day'],
'10min': ['minute', 'hour', 'dayofweek', 'day'],
'D': ['dayofweek', 'day'],
'1D': ['dayofweek', 'day']
}
Expand Down Expand Up @@ -319,15 +319,15 @@ def __init__(self,
"""
super(Estimator, self).__init__()
self.config = config
assert self.config['freq'] in ['H', '1H', 'min', '1min', '10min', 'D',
'1D'], "freq must be in ['H','1H','min','1min','10min','D','1D']"
assert self.config['freq'] in ['min', '1min', '10min', 'H', '1H', 'D', '1D'], \
"freq must be in ['min','1min','10min','H','1H','D','1D']"

self.feat_cardinality_map = {
'min': [60, 24, 8],
'1min': [60, 24, 8],
'10min': [60, 24, 8, 32],
'H': [24, 8, 32],
'1H': [24, 8, 32],
'min': [60, 24, 8, 32],
'1min': [60, 24, 8, 32],
'10min': [60, 24, 8, 32],
'D': [8, 32],
'1D': [8, 32]
}
Expand Down

0 comments on commit d92968d

Please sign in to comment.