vcr.neural.newdata: Prepare for visualization of a neural network classification...

View source: R/VCR_neuralnet.R

vcr.neural.newdataR Documentation

Prepare for visualization of a neural network classification on new data.

Description

Prepares graphical display of new data fitted by a neural net that was modeled on the training data, using the output of vcr.neural.train on the training data.

Usage

vcr.neural.newdata(Xnew, ynew = NULL, probs,
                   vcr.neural.train.out)

Arguments

Xnew

data matrix of the new data, with the same number of columns as in the training data. Missing values in Xnew are not allowed.

ynew

factor with class membership of each new case. Can be NA for some or all cases. If NULL, is assumed to be NA everywhere.

probs

posterior probabilities obtained by running the neural net on the new data.

vcr.neural.train.out

output of vcr.neural.train on the training data.

Value

A list with components:

yintnew

number of the given class of each case. Can contain NA's.

ynew

given class label of each case. Can contain NA's.

levels

levels of the response, from vcr.svm.train.out.

predint

predicted class number of each case. Always exists.

pred

predicted label of each case.

altint

number of the alternative class. Among the classes different from the given class, it is the one with the highest posterior probability. Is NA for cases whose ynew is missing.

altlab

alternative label if yintnew was given, else NA.

PAC

probability of the alternative class. Is NA for cases whose ynew is missing.

fig

distance of each case i from each class g. Always exists.

farness

farness of each case from its given class. Is NA for cases whose ynew is missing.

ofarness

for each case i, its lowest fig[i,g] to any class g. Always exists.

Author(s)

Raymaekers J., Rousseeuw P.J.

References

Raymaekers J., Rousseeuw P.J.(2021). Silhouettes and quasi residual plots for neural nets and tree-based classifiers. (link to open access pdf)

See Also

vcr.neural.train, classmap, silplot, stackedplot

Examples

# For examples, we refer to the vignette:
## Not run: 
vignette("Neural_net_examples")

## End(Not run)

classmap documentation built on April 23, 2023, 5:09 p.m.