Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Last active July 7, 2019 20:42
Show Gist options
  • Save WillKoehrsen/b587a42555f06af9c529273871bb0bb2 to your computer and use it in GitHub Desktop.
Save WillKoehrsen/b587a42555f06af9c529273871bb0bb2 to your computer and use it in GitHub Desktop.
def house_price_in_aus_from_model(usd_per_floor,
usd_per_bathroom_squared,
floor_count,
bathroom_count,
usd_to_aus_rate):
"""
Calculate the house price in Australian dollars from
a polynomial regression model
"""
house_price_in_usd = usd_per_floor * floor_count + \
usd_per_bathroom_squared * bathroom_count ** 2
house_price_in_usd = house_price_in_usd + expected_mean_house_price_in_usd
house_price_in_aud = house_price_in_usd * usd_to_aud_rate
return house_price_in_aud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment