evomap.mapping._cmds#

Classic (SVD-based) Multidimensional Scaling, as proposed in:

Torgerson, W.S. Multidimensional scaling: I. Theory and method. Psychometrika 17, 401–419 (1952).

Thanks to Francis Song, from whom this implementation has borrowed. Source: http://www.nervouscomputer.com/hfs/cmdscale-in-python/

Module Contents#

Classes#

CMDS

class evomap.mapping._cmds.CMDS(n_dims=2)[source]#
static _cmdscale(D, n_dims)[source]#

Classical multidimensional scaling (MDS)

Parameters:

D ((n, n) array) – Symmetric distance matrix.

Returns:

  • Y ((n, p) array) – Configuration matrix. Each column represents a dimension. Only the p dimensions corresponding to positive eigenvalues of B are returned. Note that each dimension is only determined up to an overall sign, corresponding to a reflection.

  • e ((n,) array) – Eigenvalues of B.

fit(X)[source]#
fit_transform(X)[source]#