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.5.1.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.5.1-py3-none-any.whl (62.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csa_prediction_engine-2.5.1.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.5.1.tar.gz
Algorithm Hash digest
SHA256 c0a522924749ef27e2f998406a600a86d1c245c269f6aefa4216676316f45720
MD5 7e6a0276b31fe4774a786250a3ee1f39
BLAKE2b-256 a6c427828c5b273fd9f06bca12c82eb584e872000c10dc9305a8f8cbb1a85509

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for csa_prediction_engine-2.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e95e7a4861f9a8ed881548f771b5066c399b4888c2a9af63b02129565d334c4
MD5 7abab3a19f4958f551f92bd0d72b522b
BLAKE2b-256 f00fa1241c7c3d1497342fb8df2593199534c06f5be2a41a3474c028115d6482

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