This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/regression/code/mean_square_error.m

10 lines
308 B
Matlab

function error = meanSquareError(y, y_est)
% Function calculates the mean sqauare error between observed and predicted values.
%
% Agruments: y, the observed values
% y_est, the predicted values.
%
% Returns: the error in the mean-square-deviation sense.
error = mean((y - y_est).^2);