API Client
This module provides a set of functions for performing relevance-based predictions using the Cambridge Sports Analytics (CSA) API. The relevance engine offers flexible prediction models that support single prediction tasks, multi-y prediction tasks (multiple dependent variables), and multi-theta prediction tasks (multiple sets of circumstances).
Key Features
Single Task Prediction: Supports predictions with one dependent variable and one set of circumstances.
Multi-y Task Prediction: Allows for predictions with multiple dependent variables and a single set of circumstances.
Multi-theta Task Prediction: Enables predictions with one dependent variable and multiple sets of circumstances.
Relevance-Based Grid Prediction: Generates optimal predictions by evaluating various thresholds and variable combinations.
MaxFit Prediction: Finds the best fit model based on adjusted relevance.
Important
Multi-y and multi-theta tasks cannot be executed simultaneously. Please structure your inputs accordingly or loop through multiple calls to handle these cases separately.
Usage
The main functions in this module include:
predict_grid: For generating the relevance-based optimal grid prediction as a composite predictions across various combinations of variables and maxfit thresholds.
predict_maxfit: For finding the best fit model based on relevance.
predict: For general relevance-based predictions.
Each function takes inputs in the form of NumPy arrays for y
, X
, and theta
, and utilizes option classes (PredictionOptions
, MaxFitOptions
, GridOptions
) to configure the prediction task.
Last updated