View source: R/SOptim_PerformanceEval.R
GerritySkillScore | R Documentation |
A function used to calculate the Gerrity skill score (GSS). This statistic uses all entries in the confusion matrix, so it does not depend on the forecast distribution, and is equitable (i.e., random and constant forecasts score a value of 0). GSS does not reward conservative forecasting but rather rewards forecasts for correctly predicting the less likely categories. Smaller errors are penalized less than larger forecast errors. This is achieved through the use of the scoring matrix.
GerritySkillScore(obs, pred)
obs |
Integer vector with observed values (class labels). |
pred |
Integer vector with predicted values (class labels). |
Adapted from verification package at URL: https://github.com/cran/verification/blob/32e864afca8895391f179c2a97707e126ca31f20/R/multi.cont.R
Numeric. The GSS value calculated.
obs<-sample(c(1:5),100,replace = TRUE)
pred<-sample(c(1:5),100,replace = TRUE)
GerritySkillScore(obs, pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.