Created
April 17, 2022 22:56
-
-
Save achrafsoltani/03f8b461d95748a5107710ed1b8dab27 to your computer and use it in GitHub Desktop.
Cost function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cost = compute_cost(H, Y, m) | |
% H hypothesis matrix | |
% Y Response Variable | |
% m training examples | |
cost = (1/(2*m))*sum((H-Y).^2); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment