Week of year encoded as value between [-0.5, 0.5]
| 75 | |
| 76 | |
| 77 | class WeekOfYear(TimeFeature): |
| 78 | """Week of year encoded as value between [-0.5, 0.5]""" |
| 79 | |
| 80 | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: |
| 81 | return (index.isocalendar().week - 1) / 52.0 - 0.5 |
| 82 | |
| 83 | |
| 84 | def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]: |
nothing calls this directly
no outgoing calls
no test coverage detected