> ## Documentation Index
> Fetch the complete documentation index at: https://nixtla-old-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Built-in lag transformations

# Lag transforms

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L133" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### RollingQuantile

> ```text theme={null}
>  RollingQuantile (p:float, window_size:int,
>                   min_samples:Optional[int]=None)
> ```

*Rolling statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L130" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### RollingMax

> ```text theme={null}
>  RollingMax (window_size:int, min_samples:Optional[int]=None)
> ```

*Rolling statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L127" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### RollingMin

> ```text theme={null}
>  RollingMin (window_size:int, min_samples:Optional[int]=None)
> ```

*Rolling statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L124" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### RollingStd

> ```text theme={null}
>  RollingStd (window_size:int, min_samples:Optional[int]=None)
> ```

*Rolling statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L121" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### RollingMean

> ```text theme={null}
>  RollingMean (window_size:int, min_samples:Optional[int]=None)
> ```

*Rolling statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L186" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### SeasonalRollingQuantile

> ```text theme={null}
>  SeasonalRollingQuantile (p:float, season_length:int, window_size:int,
>                           min_samples:Optional[int]=None)
> ```

*Rolling statistic over seasonal periods*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L183" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### SeasonalRollingMax

> ```text theme={null}
>  SeasonalRollingMax (season_length:int, window_size:int,
>                      min_samples:Optional[int]=None)
> ```

*Rolling statistic over seasonal periods*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L180" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### SeasonalRollingMin

> ```text theme={null}
>  SeasonalRollingMin (season_length:int, window_size:int,
>                      min_samples:Optional[int]=None)
> ```

*Rolling statistic over seasonal periods*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L177" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### SeasonalRollingStd

> ```text theme={null}
>  SeasonalRollingStd (season_length:int, window_size:int,
>                      min_samples:Optional[int]=None)
> ```

*Rolling statistic over seasonal periods*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L174" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### SeasonalRollingMean

> ```text theme={null}
>  SeasonalRollingMean (season_length:int, window_size:int,
>                       min_samples:Optional[int]=None)
> ```

*Rolling statistic over seasonal periods*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L224" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### ExpandingQuantile

> ```text theme={null}
>  ExpandingQuantile (p:float)
> ```

*Expanding statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L221" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### ExpandingMax

> ```text theme={null}
>  ExpandingMax ()
> ```

*Expanding statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L218" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### ExpandingMin

> ```text theme={null}
>  ExpandingMin ()
> ```

*Expanding statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L215" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### ExpandingStd

> ```text theme={null}
>  ExpandingStd ()
> ```

*Expanding statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L212" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### ExpandingMean

> ```text theme={null}
>  ExpandingMean ()
> ```

*Expanding statistic*

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L233" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### ExponentiallyWeightedMean

> ```text theme={null}
>  ExponentiallyWeightedMean (alpha:float)
> ```

*Exponentially weighted average*

|       | **Type** | **Details**       |
| ----- | -------- | ----------------- |
| alpha | float    | Smoothing factor. |

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L249" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### Offset

> ```text theme={null}
>  Offset (tfm:__main__._BaseLagTransform, n:int)
> ```

*Shift series before computing transformation*

|     | **Type**           | **Details**                                                                  |
| --- | ------------------ | ---------------------------------------------------------------------------- |
| tfm | \_BaseLagTransform | Transformation to be applied                                                 |
| n   | int                | Number of positions to shift (lag) series before applying the transformation |

***

<a href="https://github.com/Nixtla/mlforecast/blob/main/mlforecast/lag_transforms.py#L276" target="_blank" style={{ float: "right", fontSize: "smaller" }}>source</a>

### Combine

> ```text theme={null}
>  Combine (tfm1:__main__._BaseLagTransform,
>           tfm2:__main__._BaseLagTransform, operator:Callable)
> ```

*Combine two lag transformations using an operator*

|          | **Type**           | **Details**                                                          |
| -------- | ------------------ | -------------------------------------------------------------------- |
| tfm1     | \_BaseLagTransform | First transformation.                                                |
| tfm2     | \_BaseLagTransform | Second transformation.                                               |
| operator | Callable           | Binary operator that defines how to combine the two transformations. |
