Calculate confusion matrices of predicted and observed responses.
Usage
Confusion(...)
confusion(x, y = NULL, cutoff = 0.5, times = numeric(), ...)
Arguments
...
named or unnamed confusion output to combine together with
the Confusion constructor.
x
factor of observed responses or Resamples object of observed
and predicted responses.
y
predicted responses.
cutoff
threshold above which binary factor probabilities are
classified as events and below which survival probabilities are classified.
If NULL, then binary responses are summed directly over predicted
class probabilities, whereas a default cutoff of 0.5 is used for
survival probabilities. Class probability summations and survival will
appear as decimal numbers that can be interpreted as expected counts.
times
numeric vector of follow-up times if y contains predicted
survival events.
Value
The return value is a ConfusionMatrix class object that inherits from
table if x and y responses are specified or a
ConfusionResamples object that inherits from list if x
is a Resamples object.