Description Usage Arguments Value Author(s) See Also Examples
this function calculates prediction performance statistics between vectors of predicted and observed values.
1 | classificationStats(prd, obs, prob = NULL)
|
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 |
data frame containing the classification statistics.
Hanna Meyer
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.