predict_maxfit
Performs a relevance-based maxfit prediction using the CSA Prediction Engine API.
This method determines the optimal relevance-based prediction by evaluating adjusted fit across various thresholds for the input data.
This function supports three types of prediction tasks:
Single prediction task: A single dependent variable and a single set of circumstances.
Multi-y prediction task: Multiple dependent variables (y) with a single set of circumstances (theta).
Multi-theta prediction task: A single dependent variable with multiple sets of circumstances (theta).
Parameters
y : ndarray
Dependent variable(s) represented as either:
Single task: Column vector [N-by-1]
Multi-y task: Matrix [N-by-Q], where Q is the number of dependent variables.
X : ndarray
Independent variables matrix of shape [N-by-K], where K is the number of features.
theta : ndarray
Circumstances represented as either
Single task: Row vector [1-by-K].
Multi-theta task: Matrix [Q-by-K], where Q is the number of different sets of circumstances.
options : MaxFitOptions
Configuration object containing key-value parameters required for the maxfit prediction task.
Returns
yhat : ndarray
Predicted outcome(s) based on the input data and circumstances.
yhat_details : dict
Dictionary containing additional details about the prediction model and results.
Raises
Raises a ValueError if both multi-y and multi-theta are specified simultaneously, or if the dimensions of y
, X
, and theta
are not compatible.
Last updated