Question: We would now like to test our model using the testing data that we produced from Question 2 . To chieve this, we'll use the

We would now like to test our model using the testing data that we produced from Question 2. To chieve this, we'll use the mean square error, which for your convenience is written as:
MSE=1Ni=1N(pi-yi)2
where pi refers to the ith prediction made from x-test,yi refers to the ith value in y-test , and N is the length of y-test .
Function Specifications:
Should return the mean square error over the input from the predicted values of X_test as compared to values of y-t test
The output should be a float rounded to 2 decimal places.
[93]:
## START FUNCTION
def test_model(model, X_test, y_test):
# your code here
return
## END FUNCTION
[95]: data = get_year_pop('Aruba')
 We would now like to test our model using the testing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!