Created
April 17, 2020 13:47
-
-
Save nusco/ddf34e5721cded8ceb4d6c541869f75a to your computer and use it in GitHub Desktop.
Revisions
-
nusco created this gist
Apr 17, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ # The gradient with multile input variables def gradient(X, Y, w): return 2 * np.matmul(X.T, (predict(X, w) - Y)) / X.shape[0]