MDS
Multidimensional scaling: places points in a low-dimensional space so that pairwise distances match the originals as closely as possible.
Algorithm
Metric (and non-metric) MDS via the SMACOF majorisation iteration, which monotonically decreases the stress functional.
Constructor
Skigen::MDS<Scalar> model(int n_components = 2, int max_iter = 300, Scalar eps = 1e-3, bool metric = true, uint64_t random_state = 0);
Parameters
| Parameter | Default | Description |
|---|---|---|
n_components | 2 | Embedding dimensionality. |
max_iter | 300 | SMACOF iterations. |
eps | 1e-3 | Stress-convergence tolerance. |
metric | true | Metric vs non-metric MDS. |
Methods
| Method | Description |
|---|---|
fit_transform(X) | Return the embedding. |
Fitted Attributes
| Accessor | Description |
|---|---|
stress() | Final stress value. |
Example
Skigen::MDS<double> mds(2);
auto Y = mds.fit_transform(X);
Verified against scikit-learn
This estimator is checked by the parity suite. See the generator tests/parity/generate_manifold_reference.py and the reference fixtures in tests/parity/data/mds/, exercised by tests/parity/parity_manifold.cpp.
API Reference
For full signatures see the MDS API Reference.