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 characters
-- For the latest version: | |
-- https://gist.github.com/parterburn/e832b9090ee35eb830529de8bd978b82 | |
-- Set this property to true to always open in a new window | |
property open_in_new_window : false | |
-- Set this property to false to reuse the current tab | |
property open_in_new_tab : true | |
-- Handlers |
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 characters
import numpy as np | |
# Setting a random seed, feel free to change it and see different solutions. | |
np.random.seed(42) | |
# TODO: Fill in code in the function below to implement a gradient descent | |
# step for linear regression, following a squared error rule. See the docstring | |
# for parameters and returned variables. | |
def MSEStep(X, y, W, b, learn_rate = 0.005): | |
""" |