Question: Challenge 4 Now we would like to test our model on the testing data that we produced in Exercise 2 . This test will give

Challenge 4
Now we would like to test our model on the testing data that we produced in Exercise 2. This test will give the Root Mean Squared Logarithmic Error (RMSLE), which is determined by:
$$
RMSLE =\sqrt{\frac{1}{N}\sum_{i=1}^N [log(1+p_i)- log(1+y_i)]^2}
$$
**$p_i$ refers to the $i^{\rm th}$ prediction made from `X_test`
* $y_i$ refers to the $i^{\rm th}$ value in `y_test`
* $N$ is the length of `y_test`
_**Function Specifications:**_
* Should take a trained model and two `arrays` as input. This will be the `X_test` and `y_test` variables from Question 2.
* Should calculate and return the Root Mean Squared Logarithmic Error (RMSLE) between the predicted values from `X_test` and the actual values in `y_test`.
* The output should be a `float` rounded to 3 decimal places.

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 Programming Questions!