yeo-johnson
$$
\psi(\lambda, y)=\left\{\begin{array}{ll}{\left((y+1)^{\lambda}-1\right) / \lambda} & {\text { if } \lambda \neq 0, y \geq 0} \\ {\log (y+1)} & {\text { if } \lambda=0, y \geq 0} \\ {\left.-\left[(-y+1)^{2-\lambda}-1\right)\right] /(2-\lambda)} & {\text { if } \lambda \neq 2, y<0} \\ {-\log (-y+1)} & {\text { if } \lambda=2, y<0}\end{array}\right.
$$
Python
#from sklearn from sklearn.preprocessing import PowerTransformer sk_yeojohnson = PowerTransformer('yeojohnson') #lambda = sk_boxcox.lambdas_ yeojohnson_data = sk_yeojohnson.fit_transform(x) inv_yeojohnson_data = sk_yeojohnson.inverse_transform(yeojohnson_data)