Browse Source

Update timefeatures.py

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

+ 1
- 1
utils/timefeatures.py View File

@@ -45,7 +45,7 @@ class DayOfMonth(TimeFeature):

class DayOfYear(TimeFeature):
"""Day 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.dayofyear - 1) / 365.0 - 0.5

class MonthOfYear(TimeFeature):


Loading…
Cancel
Save