Learn R Programming

superMDS (version 1.0.2)

TestSuperMDS: Given the configuration points of a set of training observations, and the dissimilarities between the training and test observations, compute the configuration points for a set of test observations.

Description

Suppose that we have training data observations x (of dimension nxp) with an associated binary outcome vector y of length n, and that TrainSuperMDS has already been run on the training observations. Furthermore, we have test observations xte (of dimension mxp) for which we do not have an outcome vector. This function will predict the class of the test observations, and also to compute configuration points for the test observations.

Usage

TestSuperMDS(trout, xte = NULL, dtetr = NULL)

Arguments

trout
The output of a call to TrainSuperMDS on the training data. We assume that there were n training observations which were either passed into TrainSuperMDS as a nxn dissimilarity matrix, or as a nxp dat matrix.
xte
The test observations, a matrix of dimension mxp. If this is NULL then must pass in dtetr. Can pass in xte only if previously passed in x when TrainSuperMDS was called. Otherwise, pass in dtetr instead.
dtetr
A mxn data matrix with the dissimilarity between each test observation and each training observation; if NULL then must pass in xte.

Value

ytehat
Predicted class labels for test data.
zte
Predicted configuration points for test data; should be a matrix of dimension mxS where S is the dimension of training configuration points.

References

Witten and Tibshirani (2011) Supervised multidimensional scaling for visualization, classificatoin, and bipartite ranking. CSDA.

See Also

TrainSuperMDS

Examples

Run this code
# Try ?superMDS for examples.

Run the code above in your browser using DataLab