classres function

Results of classification

Results of classification

classres is used to store results classification for one or multiple classes.

classres(c.pred, c.ref = NULL, p.pred = NULL, ncomp.selected = 1)

Arguments

  • c.pred: matrix with predicted values (+1 or -1) for each class.
  • c.ref: matrix with reference values for each class.
  • p.pred: matrix with probability values for each class.
  • ncomp.selected: vector with selected number of components for each class.

Returns

  • c.pred: predicted class values (+1 or -1).

  • p.pred: predicted class probabilities.

  • c.ref: reference (true) class values if provided.

The following fields are available only if reference values were provided. - tp: number of true positives.

  • tn: number of true negatives.

  • fp: nmber of false positives.

  • fn: number of false negatives.

  • specificity: specificity of predictions.

  • sensitivity: sensitivity of predictions.

  • misclassified: ratio of misclassified objects.

Details

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.

See Also

Methods classres class:

showPredictions.classresshows table with predicted values.
plotPredictions.classresmakes plot with predicted values.
plotSensitivity.classresmakes sn plot.
plotSpecificity.classresmakes specificity plot.
plotMisclassified.classresmakes ms ratio plot.
plotPerformance.classresmakes plot with misclassified ratio, specificity and sensitivity values.
  • Maintainer: Sergey Kucheryavskiy
  • License: MIT + file LICENSE
  • Last published: 2024-08-19