<div class="section-label"><span class="num">03</span> predict_grid</div> <div class="section-title">Composite forecast across <em>combinations</em>.</div> `predict_grid` posts a [[API/Prediction Engine/Grid|Grid]] job and returns the composite 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_grid( y, # ndarray, N × 1 or N × Q X, # ndarray, N × K theta, # ndarray, 1 × K or Q × K options # GridOptions ) → yhat, yhat_details ``` **Call:** `predict_grid` **Options:** [[Prediction Options#GridOptions|GridOptions]] **REST:** `POST /grid` ## 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">GridOptions</span> | Grid 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_maxfit|predict_maxfit]] · [[predict_psr|predict_psr]] - [[API/Prediction Engine/Grid|POST /grid]]