pssSingleClass: Calculate the maximum Peirce skill score (true skill...

View source: R/SOptim_PerformanceEval.R

pssSingleClassR Documentation

Calculate the maximum Peirce skill score (true skill statistic or Hanssen and Kuipers discriminant)

Description

A function used to calculate the maximum value of the Peirce skill score (PSS) when the predicted output is given in probability. This function applies only to single-class problems (e.g., presence/absence of a vegetation type, species).

Usage

pssSingleClass(obs, pred)

Arguments

obs

Integer vector with observed values (class labels, tipically 0 or 1).

pred

Numeric vector with predicted probabilities.

Details

This function will calculate the PSS value from 0 to 1 with intervals of 0.01. The maximum value is returned.

Value

A list with two elements:

  • values A data frame containing the thresholds and the calculated PSS values;

  • maxPSS The maximum PSS value.

Examples

obs<-sample(c(0,1),100,replace = TRUE)
pred<-runif(100,0,1)
pssSingleClass(obs,pred)


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