Question: v 1 (60 ) - y)? Exercise 3 (10 points) In this exercise, you will implement the mean squared error function. Recall that for a

v 1 (60 ) - y")? Exercise 3 (10 points) In this exercise, you will implement the mean squared error function. Recall that for a given set of data points D= {(x,y)}1sism. the mean squared error as a function of the parameters w, b, and D is defined as ESub, D) = n(fase (em) y)2 = m 11 The function below takes two arguments: y_hat: an array of predictions [y),..., (m) corresponding to the input values (z:(1),...,x()]. y: the labels corresponding to the same input values, and returns the mean squared error computed using the definition above, Implement the mean_squared_error function below. [ ] def mean_squared_error(y_hat, y): Computes mean squared error Arguments y_hat: a numpy array of shape (m, 1) y : a numpy array of shape (m, 1) Returns: loss: The mean squared error. ####*****########## Your code goes here ************* [1 project_2_tests.test_mse(mean_squared_error)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
