ddsimcares: Results of DD-SIMCA one-class classification

View source: R/ddsimcares.R

ddsimcaresR Documentation

Results of DD-SIMCA one-class classification

Description

@description ddsimcares is used to store results for DD-SIMCA one-class classification. Do not create this object manually, it will be created automatically by applying DD-SIMCA model.

Usage

ddsimcares(pcares, outcomes, classname, indices, numbers, alpha, c.ref = NULL)

Arguments

pcares

results of PCA decomposition of data (class pcares).

outcomes

outcomes of DD-SIMCA classification procedure.

classname

short text (up to 20 symbols) with class name.

indices

list with the object indices (members, strangers, unknown).

numbers

list with the object numbers in each subset (members, strangers, unknown).

alpha

significance level used for making the predictions.

c.ref

optional, vector with reference classes.

Details

Class ddsimcares inherits all properties and methods of class pcares, and has additional properties and functions for representing of classification results and other DD-SIMCA outcomes.

Do not create a ddsimcares object manually, it is created automatically when a DD-SIMCA model is developed (see ddsimca) or when the model is applied to a new data (see predict.ddsimca). The object can be used to show summary and plots for the results.

Value

Returns an object (list) of class ddsimcares with the same fields as pcares plus additional field simcares which is a list with all DD-SIMCA outcomes and related properties:

See Also

Methods specific for ddsimcares objects:

print.ddsimcares shows information about the object.
summary.ddsimcares shows statistics for results of classification.
as.data.frame.ddsimcares converts DD-SIMCA results into data frame.
as.matrix.ddsimcares converts summary of DD-SIMCA results into matrix.
writeCSV.ddsimcares saves DD-SIMCA results into a CSV file.
plotAcceptance.ddsimcares shows acceptance plot (q/q0 vs h/h0) with decision and outlier boundaries.
plotExtremes.ddsimcares shows extremes plot.
plotAliens.ddsimcares shows aliens plot.
plotDistances.ddsimcares shows plot with individual distances (q, h or f).

Methods, inherited from ldecomp class:

plotScores.ldecomp makes scores plot.
plotVariance.ldecomp makes explained variance plot.
plotCumVariance.ldecomp makes cumulative explained variance plot.

Check also ddsimca and pcares.

Examples

## make a DD-SIMCA model for Iris setosa class and show results for calibration set
library(mdatools)

data = iris[, 1:4]
class = iris[, 5]

# take every second of first 50 objects (setosa) as calibration set
se = data[seq(1, 50, by = 2), ]

# take the rest as test set
ind.test = c(seq(2, 50, by = 2), 51:150)
x.test = data[ind.test, ]
c.test = class[ind.test]

# make DD-SIMCA model and set optimal number of components to 1
model = ddsimca(se, 'setosa', scale = TRUE)
model = selectCompNum(model, 1)

# apply model to test set
r = predict(model, x.test, c.test)
print(r)

# show summary
summary(r)

# show plots
par(mfrow = c(2, 2))
plotAcceptance(r)
plotFoMs(r)
plotExtremes(r)
plotSelectivityArea(r)


mdatools documentation built on March 6, 2026, 5:08 p.m.