function E=mean_square_error2(x,y,a,b,r)
E=0;
M=length(a);
n=length(x);
for i=1:n
    s_err=(y(i)-MLP(x(i),r,a,b,M)).^2;
    E=E+s_err;
end
E=E/n;
return