Skip to main content

rbp-engine

Relevance-Based Prediction (RBP) Engine for Python: NumPy-friendly bindings to the RBP prediction engine from Cambridge Sports Analytics.

Relevance-based prediction (RBP) is a model-free prediction routine that forms a prediction as a weighted average of observed outcomes in which the weights are based on a statistic called relevance. Relevance is composed of similarity and informativeness which are both measured as Mahalanobis distances. RBP serves as a favorable alternative to conventional prediction methods such as linear regression analysis because it addresses complex dynamics that are beyond the reach of linear regression analysis. It also serves as a favorable alternative to AI models because RBP can extract as much information from complex datasets as AI models but more efficiently and with full transparency.

pip install rbp-engine

Quick start

import numpy as np
from rbp_engine import predict_grid, GridOptions, relevance, similarity, info_x, info_theta, relevance_metrics

# y: outcomes (N,)
# X: attributes (N, K)
# theta: circumstances (K,) — the single case you want a prediction for
out = predict_grid(y, X, theta, GridOptions())
print(float(out.yhat[0]))   # fit-weighted composite across attribute × observation calibrations

# Relevance-based scores without a full prediction
r = relevance(X, theta)       # relevance of each training row to the circumstances
s = similarity(X, theta)      # similarity (Mahalanobis) of each row to theta
ix = info_x(X)                # informativeness of each row vs the sample mean
it = info_theta(X, theta)     # informativeness of the circumstances vs the sample mean

# Or, all four in one native pass:
m = relevance_metrics(X, theta)
m.relevance, m.similarity, m.info_x, m.info_theta

For most analysis work, start with predict_grid. It evaluates combinations of attributes and observation subsets, then forms one composite prediction (yhat of length 1) weighted by adjusted fit.

Use relevance, similarity, info_x, and info_theta when you need scores without running a full prediction.

Built-in help includes paste-ready examples:

help(predict_grid)
help(GridOptions)
help(PredictionResults)

Core functions

Symbol Role
predict_grid / GridOptions Recommended default. Grid prediction uses combinations of attributes and observation subsets evaluate cell predictions by adjusted fit into one optimal composite (yhat, length 1), with rich insights
predict_maxfit / MaxFitOptions For a fixed attribute set, evaluate across thresholds (and optionally both censor types) and solve for the max fit / adjusted-fit / k-fit result
predict / PredictOptions Partial-sample regression using relevance-weighted average of outcomes at one or more chosen thresholds; MaxFit and Grid prediction wraps this
relevance Relevance scores of each observation to circumstances (theta); as a function of similarity and informativeness
similarity Similarity scores of each observation to circumstances
info_x, info_theta Informativeness: how unusual each observation (info_x) or the circumstances (info_theta) are relative to the sample mean
relevance_metrics All four scores above in one call (one native pass)
PredictionResults NumPy snapshot: nested groups mirror Rust (insights, prediction_weights, solo_distribution, grid_*, …); core fields on root

Supported platforms

Installs with pip on Python 3.10+. Nothing to compile, no extra system libraries.

Supported Platform Notes
macOS 11+ (Apple Silicon) Preferred platform; uses Apple Accelerate
Linux (Intel/AMD) glibc 2.34+ (RHEL 9 / Alma / Rocky / Amazon Linux 2023 / Ubuntu 22.04+)
Linux (Arm) same glibc floor
Windows (Intel/AMD) Supported; Apple Silicon macOS preferred when you have a choice

If your platform isn't listed, pip will report that no matching distribution was found.

Requires numpy>=1.24.

License

rbp-engine is commercial software and requires a license from Cambridge Sports Analytics. Contact prediction@csanalytics.io to get started.

After install, rbp-license-info is available in the same environment (activate your virtual environment if you use one):

rbp-license-info                             # request code, or status if already licensed
rbp-license-info --setlicense 'RBP-LIC-1:…'  # install the token you receive
rbp-license-info --viewlicense               # always show license status

For site or server deployments, contact Cambridge Sports Analytics, setup differs from the workstation flow above.

(c) 2026 Cambridge Prediction Analytics, LLC. All rights reserved.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

rbp_engine-1.2.4-py3-none-win_amd64.whl (6.4 MB view details)

Uploaded Python 3Windows x86-64

rbp_engine-1.2.4-py3-none-manylinux_2_34_x86_64.whl (15.4 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

rbp_engine-1.2.4-py3-none-manylinux_2_34_aarch64.whl (9.0 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

rbp_engine-1.2.4-py3-none-macosx_11_0_arm64.whl (996.7 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file rbp_engine-1.2.4-py3-none-win_amd64.whl.

File metadata

  • Download URL: rbp_engine-1.2.4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rbp_engine-1.2.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3933ad2caf8e31268b006da281c59446d8bf55b2313eae7bb3bdba34177f00a4
MD5 cc4c1f26273c0751f4d17924f9c3181b
BLAKE2b-256 71d6bdc07fa748822cb551bd520bc3a707897cac7f09045c95a0b378dd4a46a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbp_engine-1.2.4-py3-none-win_amd64.whl:

Publisher: pip-package-build.yml on CambridgeSportsAnalytics/rbp-math-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbp_engine-1.2.4-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rbp_engine-1.2.4-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bf8dd437fea1efa82d566e05153631d6d31bf1f0dc1db06adc80ac473efd94bd
MD5 a9917556f7d1a0ed27ebf3d36405459c
BLAKE2b-256 b9fa40fa9a43a79c4fe95cf2f72cabad90913d3ffeb0f0934884f52626d7083d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbp_engine-1.2.4-py3-none-manylinux_2_34_x86_64.whl:

Publisher: pip-package-build.yml on CambridgeSportsAnalytics/rbp-math-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbp_engine-1.2.4-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for rbp_engine-1.2.4-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 0e18f83ae99aae6560479881ed69e4b7ed6afa8bbda80866226f06a3f1f1ec88
MD5 12ab3c0f5129db961a4cfa5dcc80c897
BLAKE2b-256 d1deb3090eecc0863a09c1854ac8e91bb1db9e252278ee9f390d05b1bc133c29

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbp_engine-1.2.4-py3-none-manylinux_2_34_aarch64.whl:

Publisher: pip-package-build.yml on CambridgeSportsAnalytics/rbp-math-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbp_engine-1.2.4-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rbp_engine-1.2.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 45867eabd4f440709b3d9e3467538ac5eca5c4bc64784971efc46fb6c3483bb5
MD5 253a715e5e8b688d5fd201d25de3ab3e
BLAKE2b-256 b2264ef43ad70d432a4aab938b31e2c5d8aba6bae4b9a8cb947d8b9c010ad53c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbp_engine-1.2.4-py3-none-macosx_11_0_arm64.whl:

Publisher: pip-package-build.yml on CambridgeSportsAnalytics/rbp-math-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page