Browse Source

Update timefeatures.py

main
BBing 2 years ago
parent
commit
f7a54667eb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      utils/timefeatures.py

+ 1
- 1
utils/timefeatures.py View File

@@ -55,7 +55,7 @@ class MonthOfYear(TimeFeature):


class WeekOfYear(TimeFeature): class WeekOfYear(TimeFeature):
"""Week of year encoded as value between [-0.5, 0.5]""" """Week of year encoded as value between [-0.5, 0.5]"""
def __call__(self, index: pd.DatetimeIndex) -> np.ndarray:
def __call__(self, index: pd.DatetimeIndex) -> mnp.ndarray:
return (index.week - 1) / 52.0 - 0.5 return (index.week - 1) / 52.0 - 0.5


def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]: def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]:


Loading…
Cancel
Save