BJP (Bayesian Joint Probability)
Project description
Bayesian Joint Probability (BJP)
Table of Contents
Overview
BJP is a high-performance Python package (with Cython/C++ backend) for fitting multivariate normal distributions using Gibbs sampling, with support for left and right censoring. Typically, BJP is used for modelling with transformed variables using the norm-transform package. Therefore, it is designed for statistical modeling and forecasting in scenarios where data may be treated as partially observed (e.g. rainfall).
Features
- Fast Gibbs sampling for multivariate normal distributions
- Handles left and right censoring (if required)
- Generates ensemble predictions with posterior predictive sampling
- Cython/C++ backend for performance
Installation
Recommended: Using a virtual environment and installing into. A python virtual environment is a self-contained directory that contains a Python installation for a particular version, along with additional packages. It allows you to isolate dependencies for different projects.
Use the package manager pip to install normtransform.
python -m venv venv # Create a virtual environment
source venv/bin/activate # Activate the virtual enviroment, on Windows use `venv\Scripts\activate`
pip install bjpmodel #install bjpmodel
Note: See compatible versions
Example Usage
This demo.py can be used as example for BJP.
Once a python environment has been build and activated you can run demo.py from the commandline with python ./bjpmodel/demo.py
python ./bjpmodel/demo.py
[-1.30846209 -1.1149359 ] [2.31631585 0.69101736]
iterations: 1240
iterations: 1363
The number of variables is 2
The length of the Markov chain is 5000
Sampling using 1000 time periods
Warning: Predictor is NaN or missing
--- Left and right censoring ---
Mean Data: [ 0.48266767 -0.19992095] Std Data: [1.17708839 0.57420349]
Mean Predictions: [ 0.4721382 -0.19274477] Std Predictions: [1.16840932 0.57216459]
Contributing
Requests are welcome. Please contact the authors below.
License
Contact
- Andrew Schepen - andrew.schepen@csiro.au
- David Robertson - david.robertson@csiro.au
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 bjpmodel-0.2.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 330.1 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e3856051b6ecbdd78ac7d536ed79f72a775833dc24e91c58843ddad1cf6471f
|
|
| MD5 |
5ebaa21776a1dbe51973fc09e7693445
|
|
| BLAKE2b-256 |
fe9c7903c14b8954ceaf57286d01754caf589f1230a2f8ee6de0f71bb7f67233
|
File details
Details for the file bjpmodel-0.2.1-cp313-cp313-win32.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp313-cp313-win32.whl
- Upload date:
- Size: 304.7 kB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cac1d4aaa970c065d96394d27b82a697ce2a095e5ab5122881c93772614922a
|
|
| MD5 |
66bacc69676718ddc290fd4726169100
|
|
| BLAKE2b-256 |
7db17c25e9189a01544c454371bb96f16c183dbf92a393f805caf026509e8e23
|
File details
Details for the file bjpmodel-0.2.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50097829d55a071aa7305eb535e2af6b109c561b9cd294af9046e5dd37d2d81a
|
|
| MD5 |
5a097f4c99e2d4355649c71e46227959
|
|
| BLAKE2b-256 |
62989295ede0d4e6af6a8d3bbe24e559844bac07178cb67a380b354a1079e089
|
File details
Details for the file bjpmodel-0.2.1-cp313-cp313-macosx_14_0_arm64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp313-cp313-macosx_14_0_arm64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
506b4cd65c9901dd7bd4a6384a4681ed25c8ad1bd524e05100face7c216df380
|
|
| MD5 |
a6a179a0059020d1c0958ec42452f5cf
|
|
| BLAKE2b-256 |
6171c409a4e3a5cef52bcc7037c254328ec2189a9a96268e4487979ec110e819
|
File details
Details for the file bjpmodel-0.2.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 330.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e3137a017c401c588f5345aa91bcec94e9086ee9f200477683f0d7b311bd503
|
|
| MD5 |
de900b3f65e405c99fa3803a0d301163
|
|
| BLAKE2b-256 |
67afb308ff5f1f37122bc2a176bb5c7306e1ab732ba1d2b81574f83895154e30
|
File details
Details for the file bjpmodel-0.2.1-cp312-cp312-win32.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp312-cp312-win32.whl
- Upload date:
- Size: 304.8 kB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26e2a6bc2c6757af5264bf2be7d66941c6b147fbf3264e4d7bae4c5f4103430c
|
|
| MD5 |
4d26520d71d3c2cb7febf39d99c30088
|
|
| BLAKE2b-256 |
4d0b5def6ec810492917c0f7fd84752e628fff34a593a04546f1548d4427fbc1
|
File details
Details for the file bjpmodel-0.2.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7538391fcb78905d182e3ec2776cee6beb7cc35316015bd14d168b9423ad855
|
|
| MD5 |
2b46650557edd954c0224f89a077b6dc
|
|
| BLAKE2b-256 |
f87e9d1587e8d0d5e42a559d21b8e9a93656780664c58fbe92c582af62a49a4a
|
File details
Details for the file bjpmodel-0.2.1-cp312-cp312-macosx_14_0_arm64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e21b15c95e035765a6c28ccb57172edeca2a58c02166c4295a4b0cb99a95689
|
|
| MD5 |
e9121d5eab85786c49cd707d8853994d
|
|
| BLAKE2b-256 |
bb3298a9b57fbd7934d2adf3fb15c3906900a4efcf19ac15803201ae7390ec49
|
File details
Details for the file bjpmodel-0.2.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 329.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50585f2a455df7beb5aae756f88f19c31f41dee2959eb18c7bd0567c960b9ed2
|
|
| MD5 |
c20665236d12cc187cb314453e7d8137
|
|
| BLAKE2b-256 |
ebb604c851b171c61d459ae18bec5aea8cb5602f89ee2edbe97cfa3797aec503
|
File details
Details for the file bjpmodel-0.2.1-cp311-cp311-win32.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp311-cp311-win32.whl
- Upload date:
- Size: 304.9 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d4d578c68a1efb52c11aeae90b5c4d3795de27402a99a6ba38a940cef7661b0
|
|
| MD5 |
4605465d8eb41c3eaf1bb694d332b68b
|
|
| BLAKE2b-256 |
0ffc36fa99b7c5f335e42927a7209d186282e8064027fe9555c455b2594a613a
|
File details
Details for the file bjpmodel-0.2.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85f392aa5667f12c0b1c610bb54e3ec9f733476961df5ea7863b3f3621d54279
|
|
| MD5 |
644c3ad5ce78da0adf7a9a2c57b894f3
|
|
| BLAKE2b-256 |
c25b5cbe68e9f1300b1423d684af8da9363e681b0bf13b2610c64af596cd17a8
|
File details
Details for the file bjpmodel-0.2.1-cp311-cp311-macosx_14_0_arm64.whl.
File metadata
- Download URL: bjpmodel-0.2.1-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e5c1c574ee25f06fce3abfc69788d38645711aef4ea4496ed7e741ab92f7f5
|
|
| MD5 |
4c01e75818851988c3f1683fc17a5a59
|
|
| BLAKE2b-256 |
8831ff147f2f3f4f98fc58615e4a1a1be174b3448b1fd15971a3df0a0b1f75dd
|