Created
October 19, 2020 14:01
-
-
Save tiaplagata/593c6b3c989665d3b528286cbb6f24c4 to your computer and use it in GitHub Desktop.
Function to Inverse a Standard Normal Scaled Target
This file contains hidden or 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
def inv_normalize_price(feature_normalized): | |
""" | |
input the standard normal scaled target feature as an array | |
output the same array without the standard normal scale | |
""" | |
mu = df_log['price_log'].mean() | |
sd = df_log['price_log'].std() | |
return sd*feature_normalized + mu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment