|
|
|
@@ -55,7 +55,7 @@ class MonthOfYear(TimeFeature): |
|
|
|
|
|
|
|
class WeekOfYear(TimeFeature): |
|
|
|
"""Week of year 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.week - 1) / 52.0 - 0.5 |
|
|
|
|
|
|
|
def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]: |
|
|
|
|