Exercise

Fitting a simple model: regression

In this exercise, you'll practice fitting a regression model using data from the California housing market. A DataFrame called housing is available in your workspace. It contains many variables of data (stored as columns). Can you find a relationship between the following two variables?

  • "MedHouseVal": the median house value for California districts (in $100,000s of dollars)
  • "AveRooms" : average number of rooms per dwelling

Instructions

100 XP
  • Prepare X and y DataFrames using the data in housing.
    • X should be the Median House Value, y average number of rooms per dwelling.
  • Fit a regression model that uses these variables (remember to shape the variables correctly!).
  • Don't forget that each variable must be the correct shape for scikit-learn to use it!