<div class="section-label"><span class="num">04</span> predict_maxfit</div> <div class="section-title">Search thresholds for the strongest <em>fit</em>.</div> `predict_maxfit` posts a [[API/Prediction Engine/MaxFit|MaxFit]] job and returns the winning prediction plus details. Supports single-task, multi-y, and multi-theta shapes. Multi-y and multi-theta cannot be combined in one call. ## Signature ```text predict_maxfit( y, # ndarray, N × 1 or N × Q X, # ndarray, N × K theta, # ndarray, 1 × K or Q × K options # MaxFitOptions ) → yhat, yhat_details ``` **Call:** `predict_maxfit` **Options:** [[Prediction Options#MaxFitOptions|MaxFitOptions]] **REST:** `POST /maxfit` ## Arguments | Name | Shape | Description | | --- | --- | --- | | <span class="mono">y</span> | N × 1, or N × Q for multi-y | Dependent variable(s) | | <span class="mono">X</span> | N × K | Independent variables | | <span class="mono">theta</span> | 1 × K, or Q × K for multi-theta | Circumstances | | <span class="mono">options</span> | <span class="mono">MaxFitOptions</span> | MaxFit configuration | ## Returns | Name | Type | Description | | --- | --- | --- | | <span class="mono">yhat</span> | ndarray | Predicted outcome(s) | | <span class="mono">yhat_details</span> | dict | Additional model and result details | > [!warning] > Raises <span class="mono">ValueError</span> if multi-y and multi-theta are specified together, or if <span class="mono">y</span>, <span class="mono">X</span>, and <span class="mono">theta</span> dimensions do not align. ## Related - [[API/Python API Client/API Client/Overview|API Client]] - [[predict_grid|predict_grid]] · [[predict_psr|predict_psr]] - [[API/Prediction Engine/MaxFit|POST /maxfit]]