Skip to content

settylab/Mellon

Repository files navigation

https://codecov.io/github/settylab/Mellon/branch/main/graph/badge.svg?token=TKIKXK4MPG https://static.pepy.tech/personalized-badge/mellon?period=total&units=international_system&left_color=grey&right_color=lightgrey&left_text=Downloads

Mellon is a non-parametric density estimator based on the NearestNeighbors distribution.

Installation

To install with pip you can run:

pip install mellon

Documentation

Please read the documentation or use this basic tutorial notebook.

Basic Usage

import mellon
import numpy as np

X = np.random.rand(100, 10)  # 10-dimensional state representation for 100 cells
Y = np.random.rand(100, 10)  # arbitrary test data

model = mellon.DensityEstimator()
log_density_x = model.fit_predict(X)
log_density_y = model.predict(Y)