confusion | R Documentation |
Calculate confusion matrices of predicted and observed responses.
confusion(
x,
y = NULL,
weights = NULL,
cutoff = MachineShop::settings("cutoff"),
na.rm = TRUE,
...
)
ConfusionMatrix(data = NA, ordered = FALSE)
x |
factor of observed responses or resample result containing observed and predicted responses. |
y |
predicted responses if not contained in |
weights |
numeric vector of non-negative
case weights for the observed |
cutoff |
numeric (0, 1) threshold above which binary factor
probabilities are classified as events and below which survival
probabilities are classified. If |
na.rm |
logical indicating whether to remove observed or predicted
responses that are |
... |
arguments passed to other methods. |
data |
square matrix, or object that can be converted to one, of cross-classified predicted and observed values in the rows and columns, respectively. |
ordered |
logical indicating whether the confusion matrix row and columns should be regarded as ordered. |
The return value is a ConfusionMatrix
class object that inherits from
table
if x
and y
responses are specified or a
ConfusionList
object that inherits from list
if x
is a
Resample
object.
c
, plot
, summary
## Requires prior installation of suggested package gbm to run
res <- resample(Species ~ ., data = iris, model = GBMModel)
(conf <- confusion(res))
plot(conf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.