plot.epx {EPX} | R Documentation |
Plot hit curve for an "epx
" object
Description
Plots the hit curve for the fitted values of an "epx
" object.
Usage
## S3 method for class 'epx'
plot(x, max.cutoff = min(100, length(x$Y)), plot.hc = TRUE, ...)
Arguments
x |
Object of class " |
max.cutoff |
Maximum number of observations selected, equivalently the
maximum shortlist cutoff; default is |
plot.hc |
Whether to make a plot of the hit curve; default is
|
... |
Further arguments passed to or from other methods. |
Details
Order the cases by decreasing phat
(predicted probabilities of
relevance) values, and plot the expected number and actual number of hits as
cases are selected. Cases with tied phat
values are grouped together.
See hit.curve in order to plot a hit curve in general.
Value
Plot of the hit curve (if plot.hc = TRUE
) and a list with the
following vectors:
select |
Number of observations in each tied |
p |
Unique |
nhits |
Number of hits (truly relevant observations) in each tied
|
nhitlast |
Number of hits after |
Examples
# Example with data(harvest)
## Phalanx-formation using a base classifier with 50 trees (default = 500)
set.seed(761)
model <- epx(x = harvest[, -4], y = harvest[, 4],
classifier.args = list(ntree = 50))
## Hit curve for model with default settings
model.hc <- plot(model)
## In the top 100 ranked observations selected, the number that are truly
## relevant is
model.hc$nhitlast
## Hit curve with max.cutoff at 150 (Note: Commented off for time.)
model.hc.150 <- plot(model, max.cutoff = 150)
model.hc.150$nhitlast # Number of hits in top 150 ranked observations.