|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.MDS
public final class MDS
Contains methods for performing but classical and non-classical multidimensional scaling.
For an m-by-n input matrix with m observations and n variables, the output D is the symmetric m-by-m matrix with zeros along the diagonals and element ij specifying the distance between rows i and j.
Method Summary | |
---|---|
static float[][] |
classical(float[][] D,
int p,
boolean showEigenvalues)
Performs classical (metric) multidimensional scaling, on an input matrix of Distances (computed using e.g. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float[][] classical(float[][] D, int p, boolean showEigenvalues)
Distance
) and outputs the best-fitting p-dimensional configuration of points
(p<N
). The output matrix Y
has p columns with rows
giving the coordinates of the points chosen to represent the dissimilarities.
When D
corresponds to the Euclidian distance matrix, the p
dimensional coordinates correspond exactly to the first p
principal components.
Remarks
p > k
where k
is the number of
positive eigenvalues of Y*Y'
, then only the
first k columns of Y
are computed.
showEigenvalues
to true to print the
values of the "scalar product matrix" Y*Y'
to the screen.
(This is a good idea if you want to know how well the first p
dimensions
captures most of the variation in D
.
D
- the input distance matrix (see Distance
)p
- the dimension (number of columns) of the output matrix.showEigenvalues
- whether to print the eigenvalues to the screen or otherwise.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |