Skip to main content

A package for doing density estimation and clustering using Gaussian mixtures with BNP weighting models

Project description

Documentation Status PyPI - Version PyPI - Python Version

Project description

Pyrichlet is a package for doing density estimation and clustering using Gaussian mixtures with BNP weighting models

Installation

With pip:

pip install pyrichlet

For a specific version:

pip install pyrichlet==0.0.9

Usage

This is a quick guide. For a more detailed usage see https://pyrichlet.readthedocs.io/en/main/index.html.

The mixture models that this package implements are

  • DirichletDistributionMixture
  • DirichletProcessMixture
  • PitmanYorMixture
  • GeometricProcessMixture
  • BetaInBetaMixture
  • BetaInDirichletMixture
  • BetaBernoulliMixture
  • BetaBinomialMixture

They can be fitted for an array or dataframe using a Gibbs sampler or variational Bayes methods,

from pyrichlet import mixture_models

mm = mixture_models.DirichletProcessMixture()
y = [1, 2, 3, 4]
mm.fit_gibbs(y, init_groups=2)

mm.fit_variational(y, n_groups=2)

and use the fitted class to do density estimation

x = 2.5
f_x = mm.gibbs_eap_density(x)
f_x = mm.var_eap_density(x)

or clustering

mm.var_map_cluster()
mm.gibbs_map_cluster()
mm.gibbs_eap_spectral_consensus_cluster()

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

pyrichlet-0.0.9.tar.gz (51.0 kB view details)

Uploaded Source

File details

Details for the file pyrichlet-0.0.9.tar.gz.

File metadata

  • Download URL: pyrichlet-0.0.9.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for pyrichlet-0.0.9.tar.gz
Algorithm Hash digest
SHA256 b3ff9062e37979a8b6eaafcf9bae2bb3a0e0397a3d62c674bd721287643d4657
MD5 2d4321500c6dc0ff6564fc9b9a5538ae
BLAKE2b-256 6d3f3aec85864a8d75468eb81b39afe14a9e6f69995bba38c392e2a14fa919a7

See more details on using hashes here.

Supported by

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