papaya
Class MDS

java.lang.Object
  extended by papaya.MDS

public final class MDS
extends Object

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

classical

public static float[][] classical(float[][] D,
                                  int p,
                                  boolean showEigenvalues)
Performs classical (metric) multidimensional scaling, on an input matrix of Distances (computed using e.g. 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

>

Parameters:
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.
Returns:
Y, N-by-p (or N-by-k) matrix consisting of N points in each of the p (or k) dimensions.


Processing library papaya by Adila Faruk. (C) 2014