-1

I am actually coding Ridge and LASSO regressions at the same time for one dataset, and at the end I am trying to plot the graphs of performance as well as the Errors (MSE) for both methods.

For the performance, I used the commands linear_model.ridge.score() and linear_model.lasso.score() importing from sklearn. And when i plot the graph, it seems okay like it remains between 0 and 1, but when i tried to calculate the MSE for both individually, it becomes a large number i.e 798,768 (a complete list) etc But I need the error also in between 0 and 1 so that when i plot it, i may able to compare it with performance....

So my question is:

Is there any method to convert such type of list into the numbers between 0 and 1 without losing information?

Chris
  • 15,819
  • 3
  • 24
  • 37
Badshah Khan
  • 103
  • 2
  • 1
    Score is a percentage, MSE is a quantity. You probably want RMSE, so it becomes in the same units as your input, as it's easier to understand that way. Or you can use MAPE if you need it as a percentage. – Chris Jul 08 '20 at 20:25
  • Would you please add some link regarding MAPE..? – Badshah Khan Jul 08 '20 at 20:29

1 Answers1

1

Instead of MSE you can use its "normalized version" - the coefficient of determination R^2 (https://en.m.wikipedia.org/wiki/Coefficient_of_determination) which is guaranteed to be between 0 and 1. See this answer for more details https://stats.stackexchange.com/questions/32596/what-is-the-difference-between-coefficient-of-determination-and-mean-squared.

Sergey Dyshko
  • 315
  • 1
  • 5