MCPcopy Create free account
hub / github.com/kwuking/TimeMixer / HourOfDay

Class HourOfDay

utils/timefeatures.py:42–46  ·  view source on GitHub ↗

Hour of day encoded as value between [-0.5, 0.5]

Source from the content-addressed store, hash-verified

40
41
42class HourOfDay(TimeFeature):
43 """Hour of day encoded as value between [-0.5, 0.5]"""
44
45 def __call__(self, index: pd.DatetimeIndex) -> np.ndarray:
46 return index.hour / 23.0 - 0.5
47
48
49class DayOfWeek(TimeFeature):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected