measureit.rocit {ROCit} | R Documentation |
Performance Metrics of Binary Classifier
Description
This is an S3 method for object of class "rocit"
.
It computes various performance metrics at different cutoff values.
Usage
## S3 method for class 'rocit'
measureit(x, measure = c("ACC", "SENS"), ... = NULL)
Arguments
x |
An object of class |
measure |
The performance metrics to be evaluated. See "Details" for available options. |
... |
|
Details
This function calls measureit.default
. From the
components of "rocit"
objects, it calculates the score
and class
variables internally. See measureit.default
for other
details and available options for measure
argument.
Value
An object of class "measureit"
, same as returned by
measureit.default
.
Note
See measureit.default
.
See Also
measureit.default
, print.measureit
Examples
data("Diabetes")
logistic.model <- glm(as.factor(dtest)~chol+age+bmi,
data = Diabetes,family = "binomial")
class <- logistic.model$y
score <- logistic.model$fitted.values
rocit_object <- rocit(score = score, class = class)
# -------------------------------------------------------------
measure <- measureit(rocit_object, measure = c("ACC", "SENS", "FSCR"))
names(measure)
plot(measure$ACC~measure$Cutoff, type = "l")
plot(measure$TP~measure$FP, type = "l")
[Package ROCit version 2.1.2 Index]