Browse Source

Update timefeatures.py

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

+ 1
- 1
utils/timefeatures.py View File

@@ -30,7 +30,7 @@ class MinuteOfHour(TimeFeature):

class HourOfDay(TimeFeature):
"""Hour of day 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.hour / 23.0 - 0.5

class DayOfWeek(TimeFeature):


Loading…
Cancel
Save