This project contains an implementation of a Linear Regression model from scratch in Python, as well as an example usage of the model on a random dataset generated using scikit-learn.
To use the Linear Regression model, simply import the LinearRegression
class from the Linear_regression.py
file in your Python code, create an instance of the class, and call the fit
method on your training data to train the model. Once the model is trained, you can use the predict
method to make predictions on new data.
An example of using the Linear Regression model on a random dataset with multiple features can be found in the test_model.ipynb
file. This file generates a random dataset using scikit-learn, trains a Linear Regression model using the LinearRegression
class, and makes predictions on the test set. The predicted values are then compared to the true values to evaluate the performance of the model.
Contributions to this project are welcome. If you find a bug or have a suggestion for improvement, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.