Browse Source

Update timefeatures.py

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

+ 1
- 1
utils/timefeatures.py View File

@@ -35,7 +35,7 @@ class HourOfDay(TimeFeature):


class DayOfWeek(TimeFeature): class DayOfWeek(TimeFeature):
"""Hour of day encoded as value between [-0.5, 0.5]""" """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.dayofweek / 6.0 - 0.5 return index.dayofweek / 6.0 - 0.5


class DayOfMonth(TimeFeature): class DayOfMonth(TimeFeature):


Loading…
Cancel
Save