Machine learning practice by writing the univariate linear regression algorithm using pandas and matplotlib. The cost function and gradient descent algorithms are all written from scratch.
The dataset used in the file is based on the number of hours, x, that a student studied for a particular test, and the score, y, that this respective student got in the test.
The linear equation used is y = (m * x) + b, but for those used to parameters denoted as "theta", this equation can also be written as h(x) = (theta1 * x) + theta0.
- Dataset snippet:
- 32.502345269453031,31.70700584656992
- 53.426804033275019,68.77759598163891
- 61.530358025636438,62.562382297945803
- 47.475639634786098,71.546632233567777
- 59.813207869512318,87.230925133687393
- 55.142188413943821,78.211518270799232