Metadata-Version: 2.1
Name: romepy
Version: 0.1.2
Summary: Python implementation of the Robust Multi-Modal Density Estimator (ROME)
Home-page: https://github.com/anna-meszaros/ROME
License: MIT
Author: Anna Meszaros
Author-email: ana.mesaros@gmail.com
Maintainer: anna-meszaros
Maintainer-email: ana.mesaros@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: numpy (>=1.20.0,<2.0.0)
Requires-Dist: scikit-learn (>=1.2.2,<2.0.0)
Requires-Dist: scipy (>=1.0.0,<2.0.0)
Project-URL: Repository, https://github.com/anna-meszaros/ROME
Description-Content-Type: text/markdown

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![codestyle](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# ROME
This package implements the [Robust Multi-Modal Density Estimation](https://arxiv.org/abs/2401.10566). 
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.

