English (United States) subtitles

← Age/Net Worth Solution - Intro to Machine Learning

Get Embed Code
5 Languages

Showing Revision 1 created 10/10/2016 by Udacity Robot.

  1. So here's the solution to this quiz in case you had any problems.
  2. The first thing you have to do is import the sklearn regression module.
  3. Of course it isn't quite this simple because it's called sklearn.linearmodel,
  4. but you can figure this out from the documentation pretty easily.
  5. There's a familiar linear regression function, and
  6. I have my regression which I named reg.
  7. Reg gets, linear regression, and
  8. then I don't have to worry about parameters in this particular case, and
  9. then the next thing to do is just to fit it the same as we did a classifier.
  10. We do this of course on our training data, and of course now we have this
  11. regression its been, trained on our training data and we're just returning it.