|
|
@@ -45,7 +45,7 @@ class DayOfMonth(TimeFeature): |
|
|
|
|
|
|
|
|
class DayOfYear(TimeFeature): |
|
|
class DayOfYear(TimeFeature): |
|
|
"""Day of year encoded as value between [-0.5, 0.5]""" |
|
|
"""Day 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.dayofyear - 1) / 365.0 - 0.5 |
|
|
return (index.dayofyear - 1) / 365.0 - 0.5 |
|
|
|
|
|
|
|
|
class MonthOfYear(TimeFeature): |
|
|
class MonthOfYear(TimeFeature): |
|
|
|