gainstable.rocit {ROCit} | R Documentation |
Gains Table for Binary Classifier
Description
S3 method to create gains table from object of
class "rocit"
.
Usage
## S3 method for class 'rocit'
gainstable(x, ngroup = 10, breaks = NULL, ... = NULL)
Arguments
x |
A |
ngroup |
Number of desired groups in gains table. See
|
breaks |
Percentiles (in percentage) at which observations
should be separated to
form groups. See |
... |
|
Details
gainstable.rocit
calls gainstable.default
.
It creates the score
and class
variables from the
supplied "rocit"
object internally. See
gainstable.default
for details.
Value
A list of class "gainstable"
, same as returned by
gainstable.default
.
See Also
gainstable.default
, plot.gainstable
,
rocit
Examples
data("Loan")
class <- Loan$Status
score <- Loan$Score
rocit_emp <- rocit(score = score, class = class, negref = "FP")
# ----------------------------------------------------------------
gtable15 <- gainstable(rocit_emp, ngroup = 15)
gtable_custom <- gainstable(rocit_emp, breaks = seq(1,100,15))
print(gtable15)
print(gtable_custom)
# ----------------------------------------------------------------
plot(gtable15)
plot(gtable_custom)
plot(gtable_custom, type = 2)
plot(gtable_custom, type = 3)
[Package ROCit version 2.1.2 Index]