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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ec5dc48015210db24781ea97bf420bead51c9797da5e42b37c6c832a95e869
|
|
| MD5 |
2d54bc4234e9d77db71851b3c5f34a0b
|
|
| BLAKE2b-256 |
accf78797756d5cb18bd07a62686ed9342cdb69f49e0780f386713adca9deca9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31a4f653d367701fff48d98f956a28df5dbfe5c5c383e4be7cf3b92f9a3c2e69
|
|
| MD5 |
7bec046e81d67ba019b5c29ae10d0194
|
|
| BLAKE2b-256 |
104b3a012548f203ae8bd2a107c50739bc71a6e0b343e3de630d8ceac8bb4a33
|