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.
Metadata
Release files for densitypdf 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| densitypdf-0.1.4.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| densitypdf-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / densitypdf-0.1.4.tar.gz
| Download URL | densitypdf-0.1.4.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9ec5dc48015210db24781ea97bf420bead51c9797da5e42b37c6c832a95e869
|
|
BLAKE2b-256 checksum How to use checksums |
accf78797756d5cb18bd07a62686ed9342cdb69f49e0780f386713adca9deca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / densitypdf-0.1.4-py3-none-any.whl
| Download URL | densitypdf-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31a4f653d367701fff48d98f956a28df5dbfe5c5c383e4be7cf3b92f9a3c2e69
|
|
BLAKE2b-256 checksum How to use checksums |
104b3a012548f203ae8bd2a107c50739bc71a6e0b343e3de630d8ceac8bb4a33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|