https://github.com/grayfall/pymmds
Extendible metric MDS in Python
https://github.com/grayfall/pymmds
metric multidimensional-scaling multivariate-statistics python
Last synced: 4 months ago
JSON representation
Extendible metric MDS in Python
- Host: GitHub
- URL: https://github.com/grayfall/pymmds
- Owner: grayfall
- License: mit
- Created: 2018-03-26T17:44:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-19T20:31:43.000Z (about 7 years ago)
- Last Synced: 2025-09-21T18:25:15.986Z (8 months ago)
- Topics: metric, multidimensional-scaling, multivariate-statistics, python
- Language: Python
- Homepage:
- Size: 120 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyMMDS
Extendible metric MDS in Python (akin to landmark MDS). This package implements
an active metric MDS method described in "Principal Component and Correspondence
Analysis in R" by Dr. Herve Abdi (2017) and is thus similar to package bios2mds
written in the R language. The method allows new objects to be projected onto
an existing eigenbasis defined by a set of active objects and is thus useful
whenever one needs to have a stable and scalable MDS transformation.
### Requirements
- Python >= 3.5
- NumPy >= 1.14.0
- Pandas >= 0.22.0
### Installation
```
pip install pymmds
```
### Usage
There is only one core object (`mmds.Space`) and two methods to consider:
- `Space.__init__(dm: pandas.DataFrame)` - takes a symmetric distance matrix
of active (landmark) samples and creates an MDS space
- `Space.project(dm: pandas.DataFrame)` - takes a table of distances between
any number of supplementary samples and all active samples and projects the
former onto the initialised MDS space.
There is also a utility function `mmds.read_dm` that will help you read the
DMs in case you don't want to tweak `pandas.read_csv` yourself.
All functions and methods are well-documented. You can either use Python's `help`,
iPython's `?` or whatever docstring tools your IDE provides to view the docs from
within your development environment or read the
[Wiki page](https://github.com/grayfall/pymmds/wiki).