Page 135 - Artificial Intellegence_v2.0_Class_12
P. 135
esidual
arks ) rror
1 3 6 9
o. of ours tudied )
o, is calculated as
N
∑ (Pr edicted − Actual ) 2
i
i
RMSE = i=1
N
he errors are squared before being averaged in . his basically means that gives larger mistakes a higher
eight. his suggests that is far more beneficial hen substantial errors e ist and have a significant impact on
the model's performance. his characteristic is important in many mathematical calculations since it avoids taking the
absolute value of the error. he of a good model should be less than . he lo er the value, the higher
the model's performance.
Experiential Learning
Video Session
can the code or visit the follo ing link to atch the video hat is oot ean quare rror )
https .youtube.com atch v y qdI as
After atching the video, ans er the follo ing question
hat do you mean by
C alculating R MS E in Python
imp or t nu mp y as np
y _ p r ed = np .ar r ay ( [ 0 .0 0 0 , .1 6 6 , .3 3 3 ] ) predicted values
0
0
y _ tr u e = np .ar r ay ( [ 0 .0 0 0 , .2 5 4 , .9 9 8 ] ) actual values
0
0
d ef r mse( p r ed ictions, tar gets) :
d if f = p r ed ictions - tar gets
d if f _ sq = d if f * * 2
C apstone P roj e ct 133

