Skip to main content

BARMPy

text ignored, basic tests

text ignored, docs

text ignored, download count

HitCount to repo page

Intro

barmpy is the Python implementation of Baeysian Additive Regression Models, a generalization of BART, currently being researched [1]. We hope this library is useful for practictioners, enabling Bayesian architecture search and model ensembling.

Skeleton repo adapted from BartPy.

Check out the Tutorial

Quick Start

barmpy is on PyPi! Install the latest released version with pip install barmpy. barmpy also strives to be compatible with sklearn and easy-to-use. If you have arrays of target data, Y, and input data, X, you can quickly train a model and make predictions using it. barmpy currently supports ensembles of neural networks for both regression and binary classification. See below for simple examples.

from sklearn import datasets, metrics
from barmpy.barn import BARN, BARN_bin
import numpy as np

# Regression problem
db = datasets.load_diabetes()
model = BARN(num_nets=10,
          random_state=0,
          warm_start=True,
          solver='lbfgs',
		  l=1)
model.fit(db.data, db.target)
pred = model.predict(db.data)
print(metrics.r2_score(db.target, pred))

# Classification problem
bc = datasets.load_breast_cancer()
bmodel = BARN_bin(num_nets=10,
          random_state=0,
          warm_start=True,
          solver='lbfgs',
		  l=1)
bmodel.fit(bc.data, bc.target)
pred = bmodel.predict(bc.data)
print(metrics.classification_report(bc.target, np.round(pred)))

References

[1] https://arxiv.org/abs/2404.04425

Metadata

Release files for barmpy 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for barmpy 1.2.3
File Size Uploaded Provenance Actions
barmpy-1.2.3.tar.gz 18.7 kB Without provenance Details for barmpy-1.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for barmpy 1.2.3
File Interpreter ABI Platform Actions
barmpy-1.2.3-py3-none-any.whl Python 3 none any Details for barmpy-1.2.3-py3-none-any.whl

Total release size: 38.3 kB

Release files / barmpy-1.2.3.tar.gz

Download URL barmpy-1.2.3.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
57285cce25652bbfaf7fbf7846c1bca7c9b4bb399cab30f1dddedf41f614076f
BLAKE2b-256 checksum
How to use checksums
6d1d679bda06a6464d307d07c459d0335e93b17f3ecf932034a80c47a84a7ca8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / barmpy-1.2.3-py3-none-any.whl

Download URL barmpy-1.2.3-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34de984ce1e26033310114dd0b0e107ae78674f23625cc397ed274b25364f597
BLAKE2b-256 checksum
How to use checksums
11729e0a9dc400c3d51ed2e0ccd684ffd54e0e9f0709a0dcf6ad305644717914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for barmpy 1.2.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page