Skip to main content

The csa_prediction_engine library provides a suite of tools and functions for performing relevance-based predictions using the Cambridge Sports Analytics Prediction Engine API. The package is designed to facilitate single and multi-task predictions, allowing for flexible model evaluation and experimentation.

Project description

Cambridge Sports Analytics Prediction Engine

The CSA Prediction Engine is the official Python client for interacting with the Cambridge Sports Analytics (CSA) API. It enables relevance-based predictions using flexible configurations, including support for batch jobs, grid evaluations, and multi-task prediction workflows.

Source code: github.com/CambridgeSportsAnalytics/csa_prediction_engine

Key features

  • Single task predictions: One dependent variable and one set of circumstances.
  • Multi-y predictions: Multiple dependent variables with a single set of circumstances.
  • Multi-theta predictions: One dependent variable with multiple sets of circumstances.
  • Relevance-based grid predictions: Optimal composite prediction across thresholds and variable combinations.
  • Grid singularity predictions: Highest adjusted-fit prediction from the grid.
  • MaxFit predictions: Best-fit model from adjusted relevance.

Installation

Install from PyPI:

pip install csa-prediction-engine

Requires Python 3.11.

Package layout

csa_prediction_engine/
├── api_client.py                 # Public API: predict_*, decorators, quota helpers
├── bin/
│   ├── _workers.py               # Worker implementations for prediction tasks
│   └── single_tasks.py           # Single-task CLI-style entry helpers
├── helpers/
│   ├── _auth_manager.py          # API authentication
│   ├── _details_handler.py       # Model details retrieval and storage
│   ├── _payload_handler.py       # Request payloads and endpoint routing
│   ├── _postmaster.py            # Internal HTTP / communication helpers
│   └── _router.py                # Task routing from configuration
├── parallel/
│   ├── _dispatchers.py           # Parallel task dispatch
│   ├── _threaded_predictions.py  # Threaded async prediction runs
│   └── _workers.py               # Parallel worker processes
├── version.py                    # Package version string
└── __init__.py

Documentation and examples

For OpenAPI specs, quickstart examples, and tutorials, see the companion repository:

CSA Prediction Engine quickstart

Contributing

Bug reports and feature requests are welcome. Reach out to the team at support@csanalytics.io.

License

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

Project details


Download files

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

Source Distribution

csa_prediction_engine-2.4.2.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

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

csa_prediction_engine-2.4.2-py3-none-any.whl (62.2 kB view details)

Uploaded Python 3

File details

Details for the file csa_prediction_engine-2.4.2.tar.gz.

File metadata

  • Download URL: csa_prediction_engine-2.4.2.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for csa_prediction_engine-2.4.2.tar.gz
Algorithm Hash digest
SHA256 e60801a8b7836fcfdd260ab43be8b84b714ee34b4e8e39968d1a2579d34342e3
MD5 a6992134121338bebb78accb88375699
BLAKE2b-256 15d294bb9afe9aa9a494e30a18269dda75f9485c279c2d050debeae74e93c9ad

See more details on using hashes here.

File details

Details for the file csa_prediction_engine-2.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for csa_prediction_engine-2.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cdee9c8b1a32be4c106636253af8bea8fb1da07a74736f786b4ec7257385771e
MD5 afb7c94eeca76a12cf88fe24e373b02c
BLAKE2b-256 7a562b8d9fb7e526c3f22ddf8a8a50127cf281f40f7a654c72c818fe39705cd1

See more details on using hashes here.

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