Skip to main content

Python implementation of the Robust Multi-Modal Density Estimator (ROME)

Project description

License: MIT codestyle

ROME

This package implements the Robust Multi-Modal Density Estimation. This method creates a probability density function using nonparametric methods. ROME clusters data based on the OPTICS algortihm, using it to order sample points based on rechability analysis. It then generates the clustering which maximizes the silhouette score. Each cluster is then decorrelated and normalized before applying kernel density estimation.

ROME has shown itself to be superior when dealing with multi-modal and highly correlated distributions, especially for high dimensions.

Installation

ROME can be installed using:

pip install romepy

Usage

Inside a script, ROME is loaded by the following command:

from rome.ROME import ROME

rome = ROME()

After initiliazing ROME, one can then call the typical functions most scikit-learn density estimators (KDE, GMM, etc.) have:

rome.fit(X, cluster=None) # fit distribution to data X
log_probs = rome.score_samples(X) # obtain log_probs of data X according to fitted distribution
X_new = rome.sample(num_samples = 10, random_state = 0) # generate new samples according to fitted distribution

The main difference is the cluster parameter in the fit function. If it is not set to None, it can be used to skip the OPTICS based clustering and use a predifened clustering instead.

Changelog

Version 0.1.2: Initial upload of romepy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

romepy-0.1.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

romepy-0.1.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file romepy-0.1.4.tar.gz.

File metadata

  • Download URL: romepy-0.1.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-60-generic

File hashes

Hashes for romepy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e280f988b9bf47e3a47c46c3e28df9f6d13cc342457a9843aa21821a9cb79f71
MD5 8b7c2827b530c741ceba29a71d9c5526
BLAKE2b-256 5309e6a02905dd9d115004ab03245bdcc7b19cadb0f917dd1f664b90f0878688

See more details on using hashes here.

File details

Details for the file romepy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: romepy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-60-generic

File hashes

Hashes for romepy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 01be7f3acdd6adfafd8be7ae8adfaff9766bef7143a3b56ecda1ddbcf61a2186
MD5 030867440944f25fc64d1a4da7f0ed4b
BLAKE2b-256 e959073ebc1ca7fd4173a8c2029583351ec3b4a47560f6bea3ff38970e93fee2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page