<div class="section-label"><span class="num">02</span> Grid Prediction</div>
<div class="section-title">The primary form of <em>RBP</em> analysis.</div>
Evaluates combinations of predictive attributes across relevance and similarity thresholds, then forms a fit-weighted composite prediction for circumstances <span class="mono">theta</span>. Combinations that fit this task more reliably pull harder on the forecast. The result also includes variable-level **Impact on Fit** and **Impact on Prediction**.
Recommended default path for analysis.
Takes the same inputs as the other prediction calls: outcomes <span class="mono">y</span>, attributes <span class="mono">X</span>, and circumstances <span class="mono">theta</span>.
## Signature
```text
predict_grid(
y, # outcomes, length N
X, # attributes, N × K
theta, # circumstances, length K
options? # GridOptions; omit → defaults
) → results
```
**Call:** `predict_grid`
**Options:** `GridOptions` (PredictOptions base + Grid-specific options)
**Returns:** [[Results/Overview|Results]] (composite; typically T = 1)
## Arguments
| Name | Shape | Description |
| --- | --- | --- |
| <span class="mono">y</span> | N | Observed outcomes |
| <span class="mono">X</span> | N × K | Training attributes aligned with <span class="mono">y</span> |
| <span class="mono">theta</span> | K | Circumstances for the prediction task |
| <span class="mono">options</span> | (object) | <span class="mono">GridOptions</span>; optional, omit for defaults |
N = number of observations (rows), K = number of independent variables (columns).
## Options
A grid prediction call is ready with defaults: <span class="mono">threshold</span> <span class="mono">[0, 0.2, 0.5, 0.8]</span> and <span class="mono">censor_type</span> <span class="mono">both</span>. Pass a [[Settings/Options#GridOptions|GridOptions]] object when you want to change those, or any of the Grid-specific settings below.
GridOptions extends PredictOptions except <span class="mono">missing_moments</span> (Grid chooses complete vs pairwise per combination). Retain keys, inherited fields, and the full parameter list live on that page. Allowed value names: [[Settings/Allowed Values|Allowed values]].
When <span class="mono">X</span> has holes, **Impact on Fit** and **Impact on Prediction** for incomplete columns are measured against an uninformative version of that column by default, so missingness does not make those attributes look artificially weak. Observed cells are replaced with noise at that column's own scale; missing rows stay missing. Turn that off with <span class="mono">adjust_impact_for_missing</span>. See [[Results/Grid Insights|Grid Insights]].
| Name | Type / values | Default | Description |
| --- | --- | --- | --- |
| <span class="mono">max_iter</span> | integer > 0 | <span class="mono">1000</span> | Cap on combination search iterations |
| <span class="mono">k</span> | integer > 0 | <span class="mono">1</span> | Combination size / sampling parameter |
| <span class="mono">seed</span> | unsigned integer | <span class="mono">42</span> | RNG seed for combination sampling and the missing-column noise used in Impact |
| <span class="mono">attribute_combi</span> | matrix Q × K | generated | Fixed combination matrix; omit to sample |
| <span class="mono">adjust_impact_for_missing</span> | on / off | on | Incomplete-column Impact vs uninformative noise at that column's scale (same missing rows). Off is the old include-versus-exclude baseline |
| <span class="mono">retain_grid_objects</span> | omit \| comma-separated keys | omit (lean) | Which per-cell objects to keep |
| <span class="mono">inner_parallel</span> | <span class="mono">auto</span> \| <span class="mono">off</span> | <span class="mono">auto</span> | Parallel over combinations |
## Results
A successful Grid call gives you one composite forecast for this task, with fit alongside it, and variable-level **Impact on Fit** and **Impact on Prediction**. Those insights come with the usual result; you do not need to keep per-cell tables to see them.
| You get | Look here |
| --- | --- |
| Forecast and fit | <span class="mono">yhat</span>, <span class="mono">fit</span>, <span class="mono">adjusted_fit</span>, … See [[Results/Core\|Core]] |
| Variable impact | **Impact on Fit**, **Impact on Prediction**. See [[Results/Grid Insights\|Grid Insights]] |
| Solo distribution / composite ξ | When you retain <span class="mono">ysolo_distribution</span>. See [[Results/Solo Distribution\|Solo Distribution]] |
| Cell-level tables | When you set <span class="mono">retain_grid_objects</span>. See [[Results/Grid Cells\|Grid Cells]] |
The full layout of a result object: [[Results/Overview|Results]].
## Related
- [[Functions/Overview|Functions]]
- [[Predict]] · [[MaxFit]]
- [[Settings/Options#GridOptions|GridOptions]] · [[Results/Overview|Results]]