MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / __call__

Method __call__

utils/timefeatures.py:94–95  ·  view source on GitHub ↗
(self, index: pd.DatetimeIndex)

Source from the content-addressed store, hash-verified

92 """Week of year encoded as value between [-0.5, 0.5]"""
93
94 def __call__(self, index: pd.DatetimeIndex) -> np.ndarray:
95 return (index.isocalendar().week - 1) / 52.0 - 0.5
96
97
98def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected