API Reference
Lag transforms
module coreforecast.lag_transforms
class Lag
Simple lag operator
Args:
lag
(int): Number of periods to offset
method __init__
__init__(lag: int)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class RollingMean
Rolling Mean
Args:
lag
(int): Number of periods to offset by before applying the transformation.window_size
(int): Length of the rolling window.min_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(lag: int, window_size: int, min_samples: Optional[int] = None)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class RollingStd
Rolling Standard Deviation
Args:
lag
(int): Number of periods to offset by before applying the transformation.window_size
(int): Length of the rolling window.min_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(lag: int, window_size: int, min_samples: Optional[int] = None)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class RollingMin
Rolling Minimum
Args:
lag
(int): Number of periods to offset by before applying the transformation.window_size
(int): Length of the rolling window.min_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(lag: int, window_size: int, min_samples: Optional[int] = None)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class RollingMax
Rolling Maximum
Args:
lag
(int): Number of periods to offset by before applying the transformation.window_size
(int): Length of the rolling window.min_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(lag: int, window_size: int, min_samples: Optional[int] = None)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class RollingQuantile
Rolling quantile
Args:
lag
(int): Number of periods to offset by before applying the transformationp
(float): Quantile to computewindow_size
(int): Length of the rolling windowmin_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(
lag: int,
p: float,
window_size: int,
min_samples: Optional[int] = None
)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class SeasonalRollingMean
Seasonal rolling Mean
Args:
lag
(int): Number of periods to offset by before applying the transformationseason_length
(int): Length of the seasonal period, e.g. 7 for weekly datawindow_size
(int): Length of the rolling windowmin_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(
lag: int,
season_length: int,
window_size: int,
min_samples: Optional[int] = None
)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class SeasonalRollingStd
Seasonal rolling Standard Deviation
Args:
lag
(int): Number of periods to offset by before applying the transformationseason_length
(int): Length of the seasonal period, e.g. 7 for weekly datawindow_size
(int): Length of the rolling windowmin_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(
lag: int,
season_length: int,
window_size: int,
min_samples: Optional[int] = None
)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class SeasonalRollingMin
Seasonal rolling Minimum
Args:
lag
(int): Number of periods to offset by before applying the transformationseason_length
(int): Length of the seasonal period, e.g. 7 for weekly datawindow_size
(int): Length of the rolling windowmin_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(
lag: int,
season_length: int,
window_size: int,
min_samples: Optional[int] = None
)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class SeasonalRollingMax
Seasonal rolling Maximum
Args:
lag
(int): Number of periods to offset by before applying the transformationseason_length
(int): Length of the seasonal period, e.g. 7 for weekly datawindow_size
(int): Length of the rolling windowmin_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(
lag: int,
season_length: int,
window_size: int,
min_samples: Optional[int] = None
)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class SeasonalRollingQuantile
Seasonal rolling statistic
Args:
lag
(int): Number of periods to offset by before applying the transformationp
(float): Quantile to computeseason_length
(int): Length of the seasonal period, e.g. 7 for weekly datawindow_size
(int): Length of the rolling windowmin_samples
(int, optional): Minimum number of samples required to compute the statistic. If None, defaults to window_size.
method __init__
__init__(
lag: int,
p: float,
season_length: int,
window_size: int,
min_samples: Optional[int] = None
)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class ExpandingMean
Expanding Mean
Args:
lag
(int): Number of periods to offset by before applying the transformation
method __init__
__init__(lag: int)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(idxs: ndarray) → _ExpandingBase
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class ExpandingStd
Expanding Standard Deviation
Args:
lag
(int): Number of periods to offset by before applying the transformation
method __init__
__init__(lag: int)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(idxs: ndarray) → _ExpandingBase
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class ExpandingMin
Expanding Minimum
Args:
lag
(int): Number of periods to offset by before applying the transformation
method __init__
__init__(lag: int)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(idxs: ndarray) → _ExpandingBase
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class ExpandingMax
Expanding Maximum
Args:
lag
(int): Number of periods to offset by before applying the transformation
method __init__
__init__(lag: int)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(idxs: ndarray) → _ExpandingBase
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class ExpandingQuantile
Expanding quantile
Args: lag (int): Number of periods to offset by before applying the transformation p (float): Quantile to compute
method __init__
__init__(lag: int, p: float)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(_idxs: ndarray) → _BaseLagTransform
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
class ExponentiallyWeightedMean
Exponentially weighted mean
Args:
lag
(int): Number of periods to offset by before applying the transformationalpha
(float): Smoothing factor
method __init__
__init__(lag: int, alpha: float)
method stack
stack(transforms: Sequence[ForwardRef('_BaseLagTransform')]) → _BaseLagTransform
method take
take(idxs: ndarray) → ExponentiallyWeightedMean
method transform
transform(ga: GroupedArray) → ndarray
method update
update(ga: GroupedArray) → ndarray
This file was automatically generated via lazydocs.