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.2.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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: romepy-0.1.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.7 Linux/5.4.0-150-generic

File hashes

Hashes for romepy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d7445de2bd7adc364c27d7986e26e16063341b080d08c98dbafdb3e6a6efb26b
MD5 73fe5c79df5cc1221ca8531d678e9eba
BLAKE2b-256 8d324f19e4ed8f2f7cc2035564f347e5631767e1b6d4436952c7f5828c112e5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: romepy-0.1.2-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.11.7 Linux/5.4.0-150-generic

File hashes

Hashes for romepy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b64da3c4796f86f9d4cf75aeab0baf33306433b42c775d3abf841badb8fa82e0
MD5 91229f766e6b24af635652eb01e91696
BLAKE2b-256 3793d059ea709d30b6f394dc4b20e4afb96bc5ee9ad942120f778e53fb3fefc0

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