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.4.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.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for densitypdf-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c9ec5dc48015210db24781ea97bf420bead51c9797da5e42b37c6c832a95e869
MD5 2d54bc4234e9d77db71851b3c5f34a0b
BLAKE2b-256 accf78797756d5cb18bd07a62686ed9342cdb69f49e0780f386713adca9deca9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for densitypdf-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 31a4f653d367701fff48d98f956a28df5dbfe5c5c383e4be7cf3b92f9a3c2e69
MD5 7bec046e81d67ba019b5c29ae10d0194
BLAKE2b-256 104b3a012548f203ae8bd2a107c50739bc71a6e0b343e3de630d8ceac8bb4a33

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