|
|
@@ -30,7 +30,7 @@ class MinuteOfHour(TimeFeature): |
|
|
|
|
|
|
|
|
class HourOfDay(TimeFeature): |
|
|
class HourOfDay(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.hour / 23.0 - 0.5 |
|
|
return index.hour / 23.0 - 0.5 |
|
|
|
|
|
|
|
|
class DayOfWeek(TimeFeature): |
|
|
class DayOfWeek(TimeFeature): |
|
|
|