dirichlet

Dirichlet MLE python library

https://github.com/ericsuh/dirichlet

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary

Keywords

dirichlet mle python
Last synced: 6 months ago · JSON representation

Repository

Dirichlet MLE python library

Basic Info
  • Host: GitHub
  • Owner: ericsuh
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 107 KB
Statistics
  • Stars: 117
  • Watchers: 6
  • Forks: 25
  • Open Issues: 1
  • Releases: 5
Topics
dirichlet mle python
Created over 13 years ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

Dirichlet

A Python package to estimate the Dirichlet distribution, calculate maximum likelihood, and test for independence from a variable based on fitting nested Dirichlet distribution hypotheses.

Most of this package is a port of Thomas P. Minka's wonderful Fastfit MATLAB code. Much thanks to him for that and his clear paper "Estimating a Dirichlet distribution".

Dirichlet Test

This likelihood ratio test for independence will determine whether two Dirichlet-distributed data sets are likely to be from the same distribution or from two different ones, much like a chi-square or G-test for independence, but with Dirichlet models.

Simplex Plots

The dirichlet.simplex module creates scatter, contour, and filled contour 2-simplex plots. To use this, be sure to install the simplex package "extra" (e.g. pip install dirichlet[simplex]).

Caveats

Note that this package at the moment doesn't support sparse data vectors due to the numerical fitting algorithm that uses the gamma function. Possibly some sort of additive smoothing would make this package work in your context, but that will depend on your application.

Installation

pip install dirichlet
# or
uv add dirichlet

This has only been tested with Python 3.10+. Other versions may work, but they haven't been tested.

Development

To install dev tooling, run:

uv sync --frozen --locked --all-groups --all-extras

# To format
uv run ruff format

# To test
uv run pytest

# To lint
uv run ruff

A Github workflow will run tests against several Python versions.

Owner

  • Name: Eric J. Suh
  • Login: ericsuh
  • Kind: user
  • Location: San Francisco, CA

GitHub Events

Total
  • Create event: 4
  • Issues event: 1
  • Release event: 2
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 3
  • Pull request review comment event: 1
  • Pull request event: 1
  • Pull request review event: 2
Last Year
  • Create event: 4
  • Issues event: 1
  • Release event: 2
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 3
  • Pull request review comment event: 1
  • Pull request event: 1
  • Pull request review event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 30
  • Total Committers: 4
  • Avg Commits per committer: 7.5
  • Development Distribution Score (DDS): 0.2
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Eric Suh c****t@e****m 24
Eric Suh e****c@e****m 4
Nicolas Braem n****m@g****m 1
Eric J. Suh e****h 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 5
  • Total pull requests: 3
  • Average time to close issues: 6 months
  • Average time to close pull requests: 6 months
  • Total issue authors: 5
  • Total pull request authors: 3
  • Average comments per issue: 1.2
  • Average comments per pull request: 0.33
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cqcn1991 (1)
  • afrooze (1)
  • abhijitbendale (1)
  • aagraw02 (1)
Pull Request Authors
  • dependabot[bot] (2)
  • stephenHahn88 (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 173 last-month
  • Total dependent packages: 2
  • Total dependent repositories: 6
  • Total versions: 4
  • Total maintainers: 1
pypi.org: dirichlet

Calculates Dirichlet test and plots 2-simplex Dirichlets

  • Versions: 4
  • Dependent Packages: 2
  • Dependent Repositories: 6
  • Downloads: 173 Last month
Rankings
Dependent packages count: 4.7%
Dependent repos count: 6.0%
Stargazers count: 7.1%
Average: 7.1%
Forks count: 7.8%
Downloads: 9.7%
Maintainers (1)
Last synced: 7 months ago

Dependencies

requirements-dev.txt pypi
  • black ==19.10b0 development
  • tox ==3.14.5 development
setup.py pypi
  • matplotlib *
  • numpy *
  • scipy *