The observed and predicted classes are cross-tabulated for a given classification technique used in the nested loop cross validation. The predicted class that is used to construct the confusion matrix is the class that was predicted most of the time (\(>= 50\%\)) across all runs of the nested loop.
# S3 method for nlcv
confusionMatrix(x, tech, proportions = TRUE, ...)
object for which a confusionMatrix should be produced, e.g. one
produced by the nlcv
function; for the print method, it is the object
to be printed
string indicating the classification technique for which the confusion matrix should be returned
logical indicating whether the cells of the matrix should
contain proportions (TRUE
) or raw counts (FALSE
)
Dots argument to pass additional parameters to the
confusionMatrix
or print
methods
confusionMatrix
produces an object of class
confusionMatrix
which directly inherits from the ftable
class
(representing the confusion matrix)