https://m7madmomani2.github.io/reading-notes2
linear regression is a popular technique and you might as well seen the mathematical equation of linear regression.
There are several ways in which you can do that, you can do linear regression using numpy, scipy, stats model and sckit learn
is a powerful Python module for machine learning. It contains function for regression, classification, clustering, model selection and dimensionality reduction.
If you want to look inside the linear regression object, you can do so by typing LinearRegression. and the press
1) lm.fit() -> fits a linear model
2) lm.predict() -> Predict Y using the linear model with estimated coefficients
3) lm.score() -> Returns the coefficient of determination (R^2). A measure of how well observed outcomes are replicated by the model, as the proportion of total variation of outcomes explained by the model.
Simple linear regression 1 dependent variable (interval or ratio), 1 independent variable (interval or ratio or dichotomous)
Multiple linear regression 1 dependent variable (interval or ratio) , 2+ independent variables (interval or ratio or dichotomous)
Logistic regression 1 dependent variable (dichotomous), 2+ independent variable(s) (interval or ratio or dichotomous)
Ordinal regression 1 dependent variable (ordinal), 1+ independent variable(s) (nominal or dichotomous)