Skip to main content

License Travis Codecov

boostsrl is a set of Python wrappers around BoostSRL with a scikit-learn interface.

Questions? Contact Alexander L. Hayes (hayesall)

Getting Started

Prerequisites:

  • Java 1.8

  • Python (3.6, 3.7)

Installation

pip install boostsrl

Basic Usage

The general setup should be similar to scikit-learn. But there are a few extra requirements in terms of setting background knowledge and formatting the data.

A minimal working example (using the Toy-Cancer data set imported with ‘example_data’) is:

>>> from boostsrl.rdn import RDN
>>> from boostsrl import Background
>>> from boostsrl import example_data
>>> bk = Background(
...     modes=example_data.train.modes,
... )
>>> clf = RDN(
...     background=bk,
...     target='cancer',
...     max_tree_depth=2,
...     node_size=1,
... )
>>> clf.fit(example_data.train)
>>> clf.predict_proba(example_data.test)
array([0.88079619, 0.88079619, 0.88079619, 0.3075821 , 0.3075821 ])
>>> clf.classes_
array([1., 1., 1., 0., 0.])

example_data.train and example_data.test are each boostsrl.Database objects, so this hides some of the complexity behind the scenes.

This example abstracts away some complexity in exchange for compactness. For more thorough examples, see the ‘docs/examples/’ directory.

Contributing

Please refer to CONTRIBUTING.md for information on submitting issues and pull requests.

Versioning

We use SemVer for versioning. See Releases for stable versions that are available, or the Project Page on PyPi.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boostsrl-0.4.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

boostsrl-0.4.0-py3.7.egg (4.1 MB view details)

Uploaded Egg

boostsrl-0.4.0-py3-none-any.whl (4.1 MB view details)

Uploaded Python 3

File details

Details for the file boostsrl-0.4.0.tar.gz.

File metadata

  • Download URL: boostsrl-0.4.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for boostsrl-0.4.0.tar.gz
Algorithm Hash digest
SHA256 bc45fa33581fd6a7467a9534014d73e1db4c291bfb159bbe90bc5ce65171fbc7
MD5 9d8edb91261c2e639b496bd6716575d9
BLAKE2b-256 97d1e158a086ea828f17c8b72e49db6f7c77137b4d6698989e35a115ed76dc96

See more details on using hashes here.

File details

Details for the file boostsrl-0.4.0-py3.7.egg.

File metadata

  • Download URL: boostsrl-0.4.0-py3.7.egg
  • Upload date:
  • Size: 4.1 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for boostsrl-0.4.0-py3.7.egg
Algorithm Hash digest
SHA256 536e5111e99608821fba1683297025999277d8ed3b19668b0f371393d48c34d1
MD5 b84a69c0930c35381ea9ba60fe7fd3f9
BLAKE2b-256 20edb01271348070423c0434822ee4e7313a14cc52d44f14ef688535e26b1fe2

See more details on using hashes here.

File details

Details for the file boostsrl-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: boostsrl-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for boostsrl-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a35b91594ed95825d7be53bd31466c9bd516237dcaaef840f31f8b24f23e6b0
MD5 ad3c6d7a24d14972bb5b5b4a4d8a3c59
BLAKE2b-256 9d297f920afd46c009bfc473617cb186ad63092f6cff8b87b21b29409243d7bf

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.3

2 files

0.4.2

2 files

0.4.1

1 file

This release

0.4.0 This release

3 files

0.3

1 file

0.2

1 file

0.1

1 file

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