ClassMetrics | R Documentation |
Get classification accuracy metrics
ClassMetrics(x, y)
x |
The true class memberships |
y |
The predicted class memberships |
A vector with the following accuracy metrics:
Accuracy: acc
Chance accuracy: chance_acc
Cohen's Kappa: kappa
Positive predictive value: ppv
Chance positive predictive value: chance_ppv
Kappa of the positive predictive value: kappa_ppv
Negative predictive value: npv
Chance negative predictive value: chance_npv
Kappa of the negative predictive value: kappa_npv
Sensitivity: sens
Specificity: spec
Sercan Kahveci
mymod <- glm(am ~ cyl + disp + hp,
family="binomial",
data = mtcars)
newpred <- as.numeric(predict(mymod,
data=mtcars,
type="response") > 0.5)
ClassMetrics(x=mtcars$am, y=newpred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.