measureit.rocit: Performance Metrics of Binary Classifier

View source: R/measureit.R

measureit.rocitR 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 "rocit" created with rocit.

measure

The performance metrics to be evaluated. See "Details" for available options.

...

NULL. Used for S3 generic/method consistency.

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")


ROCit documentation built on May 29, 2024, 2:15 a.m.