-
-
Save jurand71/a72575aea65533ce84659149d53a09d2 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='box-cox', 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