Linear Regression is a machine learning model that tries to find a linear relationship between dependent and independent variables.
It can be used to predict the dependent variable based on input features.
In this example, we use study time as the feature and grade as the label.
◉ numpy ◉ matplotlib ◉ scikit-learn
-
main.py: Implements the Linear Regression algorithm from scratch (without using any library).
To predict grades based on study time, run test-data.py and enter the study time as input. -
linear-lib.py: Implements Linear Regression using the sklearn.linear_model library.