Created
April 18, 2022 20:25
-
-
Save achrafsoltani/116a668fa00dca8afa637853c4decd29 to your computer and use it in GitHub Desktop.
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 derivatives = compute_derivatives(X, Y, theta0, theta1, m) | |
derivatives(1) = (1/m)*sum((theta0+(theta1*X))-Y); | |
derivatives(2) = (1/m)*sum(X.*((theta0+(theta1*X))-Y)); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment