Skip to main content

boxcox_lambda

boxcox_lambda(x, method, season_length=None, lower=-0.9, upper=2.0)
Find optimum lambda for the Box-Cox transformation Parameters:
NameTypeDescriptionDefault
xndarrayArray with data to transform.required
methodstrMethod 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_lengthintLength of the seasonal period. Only required if method=‘guerrero’.None
lowerfloatLower bound for the lambda.-0.9
upperfloatUpper bound for the lambda.2.0
Returns:
NameTypeDescription
floatfloatOptimum lambda.

boxcox

boxcox(x, lmbda)
Apply the Box-Cox transformation Parameters:
NameTypeDescriptionDefault
xndarrayArray with data to transform.required
lmbdafloatLambda value to use.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

inv_boxcox

inv_boxcox(x, lmbda)
Invert the Box-Cox transformation Parameters:
NameTypeDescriptionDefault
xndarrayArray with data to transform.required
lmbdafloatLambda value to use.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the inverted transformation.

LocalMinMaxScaler

Bases: _BaseLocalScaler Scale each group to the [0, 1] interval

LocalMinMaxScaler.fit

fit(ga)
Compute the statistics for each group. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
NameTypeDescription
self_BaseLocalScalerThe fitted scaler object.

LocalMinMaxScaler.fit_transform

fit_transform(ga)
“Compute the statistics for each group and apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

LocalMinMaxScaler.inverse_transform

inverse_transform(ga)
Use the computed statistics to invert the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the inverted transformation.

LocalMinMaxScaler.stack

stack(scalers)

LocalMinMaxScaler.take

take(idxs)

LocalMinMaxScaler.transform

transform(ga)
Use the computed statistics to apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

LocalStandardScaler

Bases: _BaseLocalScaler Scale each group to have zero mean and unit variance

LocalStandardScaler.fit

fit(ga)
Compute the statistics for each group. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
NameTypeDescription
self_BaseLocalScalerThe fitted scaler object.

LocalStandardScaler.fit_transform

fit_transform(ga)
“Compute the statistics for each group and apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

LocalStandardScaler.inverse_transform

inverse_transform(ga)
Use the computed statistics to invert the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the inverted transformation.

LocalStandardScaler.stack

stack(scalers)

LocalStandardScaler.take

take(idxs)

LocalStandardScaler.transform

transform(ga)
Use the computed statistics to apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

LocalRobustScaler

LocalRobustScaler(scale)
Bases: _BaseLocalScaler Scale each group using robust statistics Parameters:
NameTypeDescriptionDefault
scalestrType 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

LocalRobustScaler.fit

fit(ga)
Compute the statistics for each group. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
NameTypeDescription
self_BaseLocalScalerThe fitted scaler object.

LocalRobustScaler.fit_transform

fit_transform(ga)
“Compute the statistics for each group and apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

LocalRobustScaler.inverse_transform

inverse_transform(ga)
Use the computed statistics to invert the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the inverted transformation.

LocalRobustScaler.stack

stack(scalers)

LocalRobustScaler.take

take(idxs)

LocalRobustScaler.transform

transform(ga)
Use the computed statistics to apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.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:
NameTypeDescriptionDefault
season_lengthintLength of the seasonal period. Only required if method=‘guerrero’.None
lowerfloatLower bound for the lambda.-0.9
upperfloatUpper bound for the lambda.2.0
methodstrMethod 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

fit(ga)
Compute the statistics for each group. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
NameTypeDescription
self_BaseLocalScalerThe fitted scaler object.

LocalBoxCoxScaler.fit_transform

fit_transform(ga)
“Compute the statistics for each group and apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

LocalBoxCoxScaler.inverse_transform

inverse_transform(ga)
Use the computed lambdas to invert the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the inverted transformation.

LocalBoxCoxScaler.stack

stack(scalers)

LocalBoxCoxScaler.take

take(idxs)

LocalBoxCoxScaler.transform

transform(ga)
Use the computed lambdas to apply the transformation. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

Difference

Difference(d)
Subtract a lag to each group Parameters:
NameTypeDescriptionDefault
dintLag to subtract.required

Difference.fit_transform

fit_transform(ga)
Apply the transformation Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the transformed data.

Difference.inverse_transform

inverse_transform(ga)
Invert the transformation Parameters:
NameTypeDescriptionDefault
gaGroupedArrayArray with grouped data.required
Returns:
TypeDescription
ndarraynp.ndarray: Array with the inverted transformation.

Difference.stack

stack(scalers)

Difference.take

take(idxs)