Metadata-Version: 2.4
Name: bjpmodel
Version: 0.2.2
Summary: BJP (Bayesian Joint Probability)
Author-email: Andrew Schepen <andrew.schepen@csiro.au>
License: MIT
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.26.0
Requires-Dist: cython>=3.0.12
Requires-Dist: setuptools>=79.0.1
Requires-Dist: pytest<9.0.0,>=8.3.5
Requires-Dist: twine<7.0.0,>=6.1.0
Requires-Dist: cibuildwheel<3.0.0,>=2.23.3
Requires-Dist: normtransform<0.3.0,>=0.2.0

# Bayesian Joint Probability (BJP)
[![Publish BJP](https://github.com/csiro-internal/py-bjp/actions/workflows/release.yml/badge.svg)](https://github.com/csiro-internal/py-bjp/actions/workflows/release.yml)
[![Build and Test BJP](https://github.com/csiro-internal/py-bjp/actions/workflows/ci_dev.yml/badge.svg?branch=master)](https://github.com/csiro-internal/py-bjp/actions/workflows/ci_dev.yml)
![license](https://img.shields.io/badge/license-MIT-blue.svg)
![status](https://img.shields.io/badge/status-alpha-blue.svg) 

## Table of Contents
- [Overview](#overview)
  - [Features](#features)
  - [Interactive Demonstration](#interactive-demonstration-of-bjp)
  - [Installation](#installation)
  - [Contributing](#contributing)
  - [License](#license)
  - [Contact](#contact)

---
## 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

---

## Interactive Demonstration of BJP

You can explore an interactive demonstration of the normtransform tool [here](https://mybinder.org/v2/gh/csiro-hydroinformatics/hydro-forecasting-demonstrations/HEAD?urlpath=%2Fdoc%2Ftree%2F%2Fnotebooks%2Fbjpmodel-demonstration.ipynb).  This link opens a Jupyter Notebook hosted on the MyBinder platform. Once it loads, click **Run-->Run All Cells** to execute the code and see the demonstration in action.

---
## Installation

A [Python virtual environment](https://packaging.python.org/en/latest/specifications/virtual-environments/) is a self-contained directory that includes a specific Python version and any additional packages you install. It helps you isolate dependencies for different projects, ensuring that changes in one environment don’t affect others. This makes it easier to manage project-specific requirements and maintain a clean development setup.

Use the package manager pip to install bjpmodel.

```bash
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
```
Once installed users can start with mimicking the [demonstration](#interactive-demonstration-of-bjp) found above within their own environment.

---

## Contributing

Requests are welcome. Please contact the authors below.

---
## License

[MIT](https://choosealicense.com/licenses/mit/) 

---
## Contact

- Andrew Schepen - andrew.schepen@csiro.au
- David Robertson - david.robertson@csiro.au

