classres
is used to store results classification for one or multiple classes.
classres(c.pred, c.ref = NULL, p.pred = NULL, ncomp.selected = 1)
predicted class values (+1 or -1).
predicted class probabilities.
reference (true) class values if provided.
The following fields are available only if reference values were provided.
number of true positives.
number of true negatives.
nmber of false positives.
number of false negatives.
specificity of predictions.
sensitivity of predictions.
ratio of misclassified objects.
matrix with predicted values (+1 or -1) for each class.
matrix with reference values for each class.
matrix with probability values for each class.
vector with selected number of components for each class.
There is no need to create a classres
object manually, it is created automatically when
build a classification model (e.g. using simca
or plsda
) or apply
the model to new data. For any classification method from mdatools
, a class using to
represent results of classification (e.g. simcares
) inherits fields and methods of
classres
.
Methods classres
class:
showPredictions.classres | shows table with predicted values. |
plotPredictions.classres | makes plot with predicted values. |
plotSensitivity.classres | makes sn plot. |
plotSpecificity.classres | makes specificity plot. |
plotMisclassified.classres | makes ms ratio plot. |
plotPerformance.classres | makes plot with misclassified ratio, specificity and sensitivity values. |