5.1. Exercises
Name That Measurement!
True or False: Regression Measurements
Calculating โby handโ
| Observation | True Value | Predicted Value |
|---|---|---|
| 0 | 4 | 5 |
| 1 | 12 | 10 |
| 2 | 6 | 9 |
| 3 | 9 | 8 |
| 4 | 3 | 3 |
Calculating Regression Measurements
Instructions:
Running a coding exercise for the first time could take a bit of time for everything to load. Be patient, it could take a few minutes.
When you see ____ in a coding exercise, replace it with what you assume to be the correct code. Run it and see if you obtain the desired output. Submit your code to validate if you were correct.
Make sure you remove the hash (#) symbol in the coding portions of this question. We have commented them so that the line wonโt execute and you can test your code after each step.
Letโs calculate some measurements from our basketball dataset this time predicting the playersโ salary. How well does our model do?
Tasks:
- Calculate the MSE, RMSE, Rs
2, and MAP measurement by comparing the true values to what the model predicted on the validation set. Name the objects mse_calc,rmse_calc,re_calcandmape_calcrespectively.