From the course: Applied Machine Learning: Supervised Learning

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Challenge: Evaluate linear regression

Challenge: Evaluate linear regression

- [Instructor] Okay, now it's your turn to try linear regression. What I want you to do is download this data set that I've linked to right here. In this data set, it has housing data from Ames, Iowa, and we're going to try and use linear regression to predict the prices of the houses there. So there are a bunch of columns in this data set. I want you to pull out just one column. It's called GR Liv Area. It's the ground living square footage. We're going to use that as the X feature, and then we're going to pull out the sell price column as the target. Then what I want you to do is split your data. We're going to hold 80% in the training data and pull out 20% as the testing data. Again, you'll probably want to use a random state. That's just going to make it so that if you rerun your analysis, you don't have values slightly changing just due to randomly pulling out different rows. You're going to train your model and then you're going to see if you can make predictions on the test…

Contents