TO START
PRELIMINARY OPERATIONS
VISUALISE DATA
|
TRAIN MODEL
pd.DataFrame: pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False). data = values, index= name index, columns= name column. This could be useful just to interpret the coefficient of the regression. MAKE PREDICTIONS
scatter: this graph show the difference between actual values and the values predicted by the model we trained. It should resemble as much as possible a diagonal line. distplot: this graph shows the distributions of the residual errors, that is, the difference between the actual values minus the predicted values; it should result in an as much as possible normal distribution. If not, maybe change model! EVALUATION METRICS
MAE is the easiest to understand, because it's the average error. MSE is more popular than MAE, because MSE "punishes" larger errors, which tends to be useful in the real world. RMSE is even more popular than MSE, because RMSE is interpretable in the "y" units. |
Cheatography
https://cheatography.com
Python - Linear Regression Model Cheat Sheet (DRAFT) by aggialavura
Linear regression model in Python
This is a draft cheat sheet. It is a work in progress and is not finished yet.