I am confused regarding the Root Mean Square Error reported in the "Summary of Fit" in the Linear Fit platform.
x = [1.309, 1.471, 1.49, 1.565, 1.611, 1.68];
y = [2.138, 3.421, 3.597, 4.34, 4.882, 5.66];
{Estimates, Std_Error, Diagnostics} = Linear Regression( y, x, <<printToLog );
z=Estimates[1]+Estimates[2]*x;
rmse_lin_reg=sqrt(sum((z-y)^2)/nrows(y));
as table(x,y,<<Column Names({"x","y"}));
biv=Bivariate(
Y( :y ),
X( :x ),
Fit Line( )
);
rmse_lin_fit=((biv<< report())["Summary of Fit"][Number Col Box(1)] <<get())[3];
show(rmse_lin_reg,rmse_lin_fit);The result of the last line:
rmse_lin_reg = 0.111508840972607;
rmse_lin_fit = 0.136569881096024;
What is wrong here?
Thank you