mesmer.stats.YeoJohnsonTransformer

mesmer.stats.YeoJohnsonTransformer#

class mesmer.stats.YeoJohnsonTransformer(name)#
__init__(name)#

Apply a Yeo-Johnson Power Transformer to make data more Gaussian

In contrast to sklearn’s PowerTransformer the parameter lambdas can be dependent on a covariate.

Parameters:

name (str) – Name of the covariate function. See the covariate_function of the returned object for details. Possible are

Methods

__init__(name)

Apply a Yeo-Johnson Power Transformer to make data more Gaussian

fit(yearly_pred, monthly_residuals[, time_dim])

estimate the optimal coefficients for the parameters \(\lambda\) for each gridcell, to normalize monthly residuals conditional on yearly predictor.

get_lambdas_from_covariates(lambda_coeffs, ...)

function that relates fitted coefficients and the yearly predictor to the lambdas.

inverse_transform(yearly_pred, ...[, time_dim])

apply the inverse power transformation using the fitted lambdas.

lambda_function(coeffs, local_yearly_T)

function defining the covariate function to calculate lambda depending on the local yearly values.

transform(yearly_pred, monthly_residuals, ...)

transform monthly_residuals following Yeo-Johnson transformer with parameters \(\lambda\), fit with fit_yeo_johnson_transform.