# Metric (rather than RMSE, MSE, etc.) to choose the best model in terms of the ability to detect peaks better

I have created multiple regression models and wanted to choose the best one. One common metric would be RMSE, as you know.

When I looked at the results, second model (RMSE = 0.15) was better able to detect some of the peaks than the first one (RMSE = 0.1). For example look at the two results:

Best model (RMSE = 0.1):

Here is the second model's result(RMSE = 0.15): The model which is able to detect all the peaks, as much as possible (although its RMSE is not the least among all of the models), is more preferable than a model which has less RMSE but is not able to detect peaks. I searched through the web but didn't find what I was looking for.

Can anyone suggest me a code to evaluate the results of the models, based on their ability to detect peaks better?

Suppose the results are simply 2 arrays:

import numpy as np
np.random.seed(10)
predicted_1 = np.random.rand(10, 1)
predicted_2 = np.random.rand(10, 1)
original = np.random.rand(10, 1)

• Are you interested in all of the peaks, or only the largest peaks? What about troughs - what should the metric indicate then? – bradS Apr 24 '19 at 11:02
• The model which predicts all of the peaks is more preferable. My model is a weather forecasting one. Hence, it's ability to detect peaks is of high importance for me. It should be able to detect all of the peaks. Large and small ones. The more it detects the peaks, the less the error should be. – hyTuev Apr 25 '19 at 9:44
• Hw about estimating correlation? See here stackoverflow.com/questions/6157791/…. Perhaps this can be used along with your RMSE somehow. – TwinPenguins Apr 25 '19 at 10:11
• @TwinPenguins Thanks.Using R-squared along with RMSE seems interesting. as discussed here: stats.stackexchange.com/questions/38631/…. – hyTuev Apr 25 '19 at 11:17