View source: R/SOptim_PerformanceEval.R
pssSingleClass | R Documentation |
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).
pssSingleClass(obs, pred)
obs |
Integer vector with observed values (class labels, tipically 0 or 1). |
pred |
Numeric vector with predicted probabilities. |
This function will calculate the PSS value from 0 to 1 with intervals of 0.01. The maximum value is returned.
A list with two elements:
values A data frame containing the thresholds and the calculated PSS values;
maxPSS The maximum PSS value.
obs<-sample(c(0,1),100,replace = TRUE)
pred<-runif(100,0,1)
pssSingleClass(obs,pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.