Skip to content

Instantly share code, notes, and snippets.

@tiaplagata
Created October 19, 2020 14:01
Show Gist options
  • Save tiaplagata/593c6b3c989665d3b528286cbb6f24c4 to your computer and use it in GitHub Desktop.
Save tiaplagata/593c6b3c989665d3b528286cbb6f24c4 to your computer and use it in GitHub Desktop.
Function to Inverse a Standard Normal Scaled Target
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