Learn R Programming

mdatools (version 0.5.3)

classres: Results of classification

Description

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

Usage

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

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.

Value

  • c.predpredicted class values (+1 or -1).
  • c.refreference (true) class values if provided.
  • The following fields are available only if reference values were provided.
  • tpnumber of true positives.
  • fpnmber of false positives.
  • fnnumber of false negatives.
  • specificityspecificity of predictions.
  • sensitivitysensitivity of predictions.

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: ll{ showPredictions.classres shows table with predicted values. plotPredictions.classres makes plot with predicted values. plotSensitivity.classres makes plot with sensitivity vs. components values. plotSpecificity.classres makes plot with specificity vs. components values. plotMisclassified.classres makes plot with misclassified ratio values. plotPerformance.classres makes plot with misclassified ration, specificity and sensitivity values. }

see examples for simcares, simcamres and plsdares.