-
-
Save jurand71/24d9fcb8a3374a6dc18f1acd289a3437 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
transformer = PowerTransformer(method='yeo-johnson', standardize=False) | |
# first find the optimal lambda using the train set | |
transformer.fit(df[variables].fillna(1)) | |
transformed_var = transformer.transform(df[variables].fillna(1)) | |
transformed_var = pd.DataFrame(transformed_var, columns = variables) | |
Gaussian_distribution_check(df, "YearBuilt" ) | |
Gaussian_distribution_check(transformed_var, "YearBuilt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment