reg2info is a Python package for getting meaningful information from a Linear regression model.
Binary installers for the latest released version are available at the Python Package Index (PyPI)
Use the package manager pip to install reg2info :
pip install reg2info
- Numpy
- Matplotlib
-
A linear regression line has an equation of the form Y = a + bX, where X is the explanatory variable and Y is the dependent variable. The slope of the line is b, and a is the intercept (the value of y when x = 0).
-
A regression line is the “best fit” line for your data. You basically draw a line that best represents the data points. It’s like an average of where all the points line up. In linear regression, the regression line is a perfectly straight line.
import reg2info as r2i
lr = LinearRegression().fit(X_train, y_train)
# returns equation
eq = r2i.reg_equation(lr)
# returns line and data plot
plot = r2i.reg_plot(lr,X_train[feature], y_train)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.