Skip to main content

Evaluation of probability density functions

Project description

Density PDF

Evaluation of univariate density functions defined in the density package.

Install

pip install densitypdf 

Usage

from densitypdf import density_pdf

# Example mixture with one scipy normal and one builtin normal

mixture_spec = {
    "type": "mixture",
    "components": [
        {
            "density": {
                "type": "scipy",
                "name": "norm",
                "params": {"loc": 0, "scale": 1}
            },
            "weight": 0.6
        },
        {
            "density": {
                "type": "builtin",
                "name": "norm",
                "params": {"loc": 2.0, "scale": 1.0}
            },
            "weight": 0.4
        }
    ]
}

val = density_pdf(mixture_spec, x=0.0)

The builtin options are replacements for scipy.stats distributions should you wish to use them.

Specifying densities or mixtures of the same

One is limited to a finite set of continuous distributions, and mixtures of the same.

See examples of specifying densities.

See the Scipy manifest for a list of densities.

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

densitypdf-0.1.3.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

densitypdf-0.1.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file densitypdf-0.1.3.tar.gz.

File metadata

  • Download URL: densitypdf-0.1.3.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for densitypdf-0.1.3.tar.gz
Algorithm Hash digest
SHA256 89ee4ec54031d92befce3e2c486958e3d999ea1eb1fb76808db7f7a3c98ca07a
MD5 bcce9aafe041e39ebad7e9b4b8ca19d2
BLAKE2b-256 9649fa206344ef30451234858be2eccbb7c38dcb5426fc7eda52bc4789d0d981

See more details on using hashes here.

File details

Details for the file densitypdf-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: densitypdf-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for densitypdf-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 22189f2e5249b0f1a71f7eb513cf8127620b23945b2531ee5d92fa248fbd7564
MD5 1e077cb96077cfa44ceddaa4b739bf9c
BLAKE2b-256 e0f66fcf0f8c4a7883c2d29db8aa9e56dcb13676c74d58b49229b7e5f789fa92

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