RMSE: Root Mean Square Error is the measure of how well a regression line fits the data points. RMSE can also be construed as Standard Deviation in the residuals.
Consider the given data points: (1, 1), (2, 2), (2, 3), (3, 6).
Lets break the above data points into 1-d lists.
x = [1, 2, 2, 3] y = [1, 2, 3, 6]
Code : Regression Graph
Code: Mean Calculation
Value of X mean 2.0 value of Y mean 3.0
Code : Line Equation
Code : Mean Squared Error
Root mean square error 0.6123724356957945
Code : RMSE Calculation
Root Mean square error using maths 0.6123724356957945
R-squared Error or Coefficient of Determination
R2 error answers the below question.
How much y varies with variation in x.Basically the % variation of y on variation with x
Code : R-Squared Error
Rsquared error 0.8928571428571429
Code : R-Squared Error with sklearn
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course