GerritySkillScore: Calculate the Gerrity Skill score

View source: R/SOptim_PerformanceEval.R

GerritySkillScoreR Documentation

Calculate the Gerrity Skill score

Description

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.

Usage

GerritySkillScore(obs, pred)

Arguments

obs

Integer vector with observed values (class labels).

pred

Integer vector with predicted values (class labels).

Details

Adapted from verification package at URL: https://github.com/cran/verification/blob/32e864afca8895391f179c2a97707e126ca31f20/R/multi.cont.R

Value

Numeric. The GSS value calculated.

Examples


obs<-sample(c(1:5),100,replace = TRUE)
pred<-sample(c(1:5),100,replace = TRUE)
GerritySkillScore(obs, pred)



joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.