classificationStats: calculate prediction performance statistics for binary...

Description Usage Arguments Value Author(s) See Also Examples

Description

this function calculates prediction performance statistics between vectors of predicted and observed values.

Usage

1
classificationStats(prd, obs, prob = NULL)

Arguments

prd

factor vector of predicted values with two levels

obs

factor vector of observed values with two levels

prob

optional. Predicted probabilities for the first class

Value

data frame containing the classification statistics.

Author(s)

Hanna Meyer

See Also

regressionStats

Examples

1
2
3
4
5
6
7
#create two random vectors with classes "yes" and "no" to simulate a model
#with random performance. Expected POD and PFD =50%
pred_vals <- factor(sample(c("Yes","No"), 50, replace = TRUE),levels=c("Yes","No"))
obs_vals <- factor(sample(c("Yes","No"), 50, replace = TRUE),levels=c("Yes","No"))

result <- classificationStats(pred_vals, obs_vals)
result

HannaMeyer/sptm documentation built on May 15, 2019, 4:29 p.m.