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.
- Mathematical explanation for Linear Regression working
- Chi-Square Test for Feature Selection - Mathematical Explanation
- Mathematical Functions in Python | Set 2 (Logarithmic and Power Functions)
- Mathematical Functions in Python | Set 3 (Trigonometric and Angular Functions)
- Mathematical Functions in Python | Set 4 (Special Functions and Constants)
- Mathematical Functions in Python | Set 1 (Numeric Functions)
- Q-learning Mathematical Background
- Python | Mathematical Median of Cumulative Records
- Plot Mathematical Expressions in Python using Matplotlib
- Evaluate the Mathematical Expressions using Tkinter in Python
- Explanation of Fundamental Functions involved in A3C algorithm
- Recurrent Neural Networks Explanation
- Long Short Term Memory Networks Explanation
- ML | OPTICS Clustering Explanation
- Explanation of BERT Model - NLP
- Django settings file - step by step Explanation
- Python | Prompt for Password at Runtime and Termination with Error Message
- ML | Log Loss and Mean Squared Error
- ML | Models Score and Error
- NZEC error in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.