Documentation Index
Fetch the complete documentation index at: https://nixtlaverse.nixtla.io/llms.txt
Use this file to discover all available pages before exploring further.
boxcox_lambda
boxcox_lambda(x, method, season_length=None, lower=-0.9, upper=2.0)
Find optimum lambda for the Box-Cox transformation
Parameters:
| Name | Type | Description | Default |
|---|
x | ndarray | Array with data to transform. | required |
method | str | Method to use. Valid options are ‘guerrero’ and ‘loglik’. ‘guerrero’ minimizes the coefficient of variation for subseries of x and supports negative values. ‘loglik’ maximizes the log-likelihood function. | required |
season_length | int | Length of the seasonal period. Only required if method=‘guerrero’. | None |
lower | float | Lower bound for the lambda. | -0.9 |
upper | float | Upper bound for the lambda. | 2.0 |
Returns:
| Name | Type | Description |
|---|
float | float | Optimum lambda. |
boxcox
Apply the Box-Cox transformation
Parameters:
| Name | Type | Description | Default |
|---|
x | ndarray | Array with data to transform. | required |
lmbda | float | Lambda value to use. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
inv_boxcox
Invert the Box-Cox transformation
Parameters:
| Name | Type | Description | Default |
|---|
x | ndarray | Array with data to transform. | required |
lmbda | float | Lambda value to use. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the inverted transformation. |
LocalMinMaxScaler
LocalMinMaxScaler(skipna=False)
Bases: _BaseLocalScaler
Scale each group to the [0, 1] interval
Parameters:
| Name | Type | Description | Default |
|---|
skipna | bool | If True, exclude NaN values when computing statistics. When False (default), NaN values are included and may result in NaN statistics. | False |
LocalMinMaxScaler.fit
Compute the statistics for each group.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Name | Type | Description |
|---|
self | _BaseLocalScaler | The fitted scaler object. |
“Compute the statistics for each group and apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
Use the computed statistics to invert the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the inverted transformation. |
LocalMinMaxScaler.stack
LocalMinMaxScaler.take
Use the computed statistics to apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
LocalStandardScaler
LocalStandardScaler(skipna=False)
Bases: _BaseLocalScaler
Scale each group to have zero mean and unit variance
Parameters:
| Name | Type | Description | Default |
|---|
skipna | bool | If True, exclude NaN values when computing statistics. When False (default), NaN values are included and may result in NaN statistics. | False |
LocalStandardScaler.fit
Compute the statistics for each group.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Name | Type | Description |
|---|
self | _BaseLocalScaler | The fitted scaler object. |
“Compute the statistics for each group and apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
Use the computed statistics to invert the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the inverted transformation. |
LocalStandardScaler.stack
LocalStandardScaler.take
Use the computed statistics to apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
LocalRobustScaler
LocalRobustScaler(scale, skipna=False)
Bases: _BaseLocalScaler
Scale each group using robust statistics
Parameters:
| Name | Type | Description | Default |
|---|
scale | str | Type of robust scaling to use. Valid options are ‘iqr’ and ‘mad’. If ‘iqr’ will use the inter quartile range as the scale. If ‘mad’ will use median absolute deviation as the scale. | required |
skipna | bool | If True, exclude NaN values when computing statistics. When False (default), NaN values are included and may result in NaN statistics. | False |
LocalRobustScaler.fit
Compute the statistics for each group.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Name | Type | Description |
|---|
self | _BaseLocalScaler | The fitted scaler object. |
“Compute the statistics for each group and apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
Use the computed statistics to invert the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the inverted transformation. |
LocalRobustScaler.stack
LocalRobustScaler.take
Use the computed statistics to apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
LocalBoxCoxScaler
LocalBoxCoxScaler(method, season_length=None, lower=-0.9, upper=2.0)
Bases: _BaseLocalScaler
Find the optimum lambda for the Box-Cox transformation by group and apply it
Parameters:
| Name | Type | Description | Default |
|---|
season_length | int | Length of the seasonal period. Only required if method=‘guerrero’. | None |
lower | float | Lower bound for the lambda. | -0.9 |
upper | float | Upper bound for the lambda. | 2.0 |
method | str | Method to use. Valid options are ‘guerrero’ and ‘loglik’. ‘guerrero’ minimizes the coefficient of variation for subseries of x and supports negative values. ‘loglik’ maximizes the log-likelihood function. | required |
LocalBoxCoxScaler.fit
Compute the statistics for each group.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Name | Type | Description |
|---|
self | _BaseLocalScaler | The fitted scaler object. |
“Compute the statistics for each group and apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
Use the computed lambdas to invert the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the inverted transformation. |
LocalBoxCoxScaler.stack
LocalBoxCoxScaler.take
Use the computed lambdas to apply the transformation.
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
Difference
Subtract a lag to each group
Parameters:
| Name | Type | Description | Default |
|---|
d | int | Lag to subtract. | required |
Apply the transformation
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the transformed data. |
Invert the transformation
Parameters:
| Name | Type | Description | Default |
|---|
ga | GroupedArray | Array with grouped data. | required |
Returns:
| Type | Description |
|---|
ndarray | np.ndarray: Array with the inverted transformation. |
Difference.stack
Difference.take