JavaScript – Machine Learning – Linear Regression w/2 new datasets…how did we do?

Git Hub Code

Ok, I added two data sets from Professor Andrew Ng’s course (see references) and the results are good…I think.  The first dataset is a simple and the results were as expected:

Screen Shot 2017-10-29 at 2.18.30 PM

Screen Shot 2017-10-29 at 2.14.21 PM

The second data set was more complex and is the one Professor Ng uses in his class.  The results were not what I was expecting, but close.

Screen Shot 2017-10-29 at 2.15.02 PM

First, thetaZero and thetaOne were much larger.   Secondly, the prediction for 4215 was not close to the value of y that was provided in the dataset.  The same for 852.  But, the results were plausible.

Screen Shot 2017-10-29 at 2.18.43 PM

My next step is to try other single variable data sets with known outcomes to ascertain how good the working example Mr Brownlee provided (see references) and/or how poor my understanding of the process still is.

Stay tuned!

References

  1. https://www.coursera.org/learn/machine-learning
  2. https://machinelearningmastery.com/simple-linear-regression-tutorial-for-machine-learning/
  3. https://github.com/girishkuniyal/Predict-housing-prices-in-Portland
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s