<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/Grid Options#GridOptions|GridOptions]] object when you want to change those. Size policy, sampling, retain keys, and inherited fields: [[Settings/Grid Options|Grid options]]. 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. Turn that off with <span class="mono">adjust_impact_for_missing</span>. See [[Results/Grid Insights|Grid Insights]]. | Name | Default | Role | | --- | --- | --- | | <span class="mono">max_iter</span> | <span class="mono">1000</span> | Cap on combinations evaluated | | <span class="mono">min_k</span> / <span class="mono">max_k</span> | <span class="mono">1</span> / omit | Band of combination sizes. <span class="mono">k</span> is the same as <span class="mono">min_k</span> | | <span class="mono">allowed_k</span> | omit | Exact sizes, such as <span class="mono">[1, 3, 7, 10]</span>. Replaces the band | | <span class="mono">seed</span> | <span class="mono">42</span> | RNG seed for sampling and missing-column noise | | <span class="mono">attribute_combi</span> | generated | Fixed combination matrix. Omit to sample | | <span class="mono">required_attributes</span> | omit | Attributes on in every combination | | <span class="mono">attribute_groups</span> | omit | Attributes selected together | | <span class="mono">adjust_impact_for_missing</span> | on | Incomplete-column Impact vs uninformative noise | | <span class="mono">retain_grid_objects</span> | omit (lean) | Which per-cell objects to keep | | <span class="mono">inner_parallel</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]] - [[Functions/PSR]] · [[MaxFit]] - [[Settings/Grid Options|Grid options]] · [[Results/Overview|Results]] - [[Further reading/01 Overview|Apply RBP to an experiment]]