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

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/VCR_neuralnet.R

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

1
2
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

1
2
3
4
5
# For examples, we refer to the vignette:
## Not run: 
vignette("Neural_net_examples")

## End(Not run)

classmap documentation built on Jan. 10, 2022, 1:06 a.m.