BART vectoriZed
An implementation of Bayesian Additive Regression Trees (BART) in JAX.
If you don't know what BART is, but know XGBoost, consider BART as a sort of Bayesian XGBoost. bartz makes BART run fast enough to be used in place of XGBoost/lightgbm/etc. even on large datasets.
BART is a nonparametric Bayesian regression technique. Given training predictors $X$ and responses $y$, BART finds a function to predict $y$ given $X$. The result of the inference is a sample of possible functions, representing the uncertainty over the determination of the function.
This Python module provides an implementation of BART that runs on GPU, to process large datasets faster. It is also good on CPU. Most other implementations of BART are for R, and run on CPU only.
On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of) if n > 20,000, but using 1/20 of the memory. On GPU, the speed premium depends on sample size; it is convenient over CPU only for n > 10,000. The maximum speedup is currently 200x, on an Nvidia A100 and with at least 2,000,000 observations.
This Colab notebook runs bartz with n = 100,000 observations, p = 1000 predictors, 10,000 trees, for 2000 MCMC iterations, in 10 minutes.
BART is a very flexible method with many variants. This implementation provides only a small subset of the possible features. If you need a feature from another BART implementation or from the BART literature, please open an issue on github.
Links
- Documentation (latest release)
- Documentation (development version)
- Repository
- Code coverage
- Benchmarks
- List of BART packages
Citing bartz
Article: Petrillo (2024), "Very fast Bayesian Additive Regression Trees on GPU", arXiv:2410.23244.
To cite the software directly, including the specific version, use zenodo.
Metadata
Release files for bartz 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bartz-0.14.0.tar.gz | 224.7 kB | Without provenance | Details for bartz-0.14.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bartz-0.14.0-py3-none-any.whl | Python 3 | none | any | Details for bartz-0.14.0-py3-none-any.whl |
Total release size: 503.3 kB
Release files / bartz-0.14.0.tar.gz
| Download URL | bartz-0.14.0.tar.gz |
|---|---|
| Size | 224.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6739c7db0e73407ab978bea747025a2929d6c04cd872ffbbe80241a16741bae4
|
|
BLAKE2b-256 checksum How to use checksums |
eb851839428f215f4a7312f638dfb163c7427eeb3a2afd9a3b57a9661a542b85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / bartz-0.14.0-py3-none-any.whl
| Download URL | bartz-0.14.0-py3-none-any.whl |
|---|---|
| Size | 278.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f1761a2f2e58cc5679ffb0fd2cb7b74509751a6623488d67cfa12d6c96a07b6
|
|
BLAKE2b-256 checksum How to use checksums |
f4efdeb7f8f239980f637bfa62ed8399e10423e483ae31e1b667fb06a6115609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for bartz 0.14.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.