Browse Source

Update timefeatures.py

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

+ 1
- 1
utils/timefeatures.py View File

@@ -50,7 +50,7 @@ class DayOfYear(TimeFeature):

class MonthOfYear(TimeFeature):
"""Month 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.month - 1) / 11.0 - 0.5

class WeekOfYear(TimeFeature):


Loading…
Cancel
Save