Linear Regression Model with only Python Standard Library
Linear Regression Model with only Python Standard Library based on
Ordinary Least Squares (OLS) Method
This module use Python Standard Library only. Python version should be higher than 3.6
pip install pylinreg
This code works as module not a script.
import pylinreg
predictors = [1, 2, 3, 4, 5]
targets = [15, 25, 35, 45, 55]
Model = pylinreg.LinearModel(predictors, targets)
slope = Model.slope
intercept = Model.intercept
predictor = 6
prediction = Model.make_prediction(predictor)
The prediction is 65.
help(pylinreg)
Examples are available in the test.py
The content of this repository is licensed under MIT license. For more details, check LICENSE