-1

I want to calculate my model accuracy for rainfall forecasting. I already calculated MAE, RMSE, MAPE for rainfall forecasting. But want to know the total model accuracy, for instance, my model is predicting 96% accurate results. How can I do this in python? Here is my code how I calculated MAE, RMSE, MAPE in python with sklearn

from sklearn.metrics import mean_squared_error, explained_variance_score

mae = mean_squared_error(true, predicted)
print('Mean Squared Error : {}'.format(mae))

rmse = np.sqrt(mean_squared_error(true, predicted))
print('Root Mean Squared Error : {}'.format(rmse))


evs = explained_variance_score(true, predicted)
print('Explained Variance Score: {}'.format(evs))
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • The default scoring metric in scikit-learn for regression is [Coefficient of determination](https://en.wikipedia.org/wiki/Coefficient_of_determination) (R-squared). You can use that. An R2 of 1 indicates that the regression predictions perfectly fit the data. – Vivek Kumar Oct 16 '18 at 10:32
  • This isn't really a question about programming or software development. You can get machine learning help on https://stats.stackexchange.com – Jean-François Corbett Oct 16 '18 at 10:40

1 Answers1

0

Accuracy is a measure used for Classification problems. The metrics you chose seem ok for a regression problem.

Franco Piccolo
  • 6,845
  • 8
  • 34
  • 52