<div class="section-label"><span class="num">02</span> Options</div> <div class="section-title"><em>Settings</em> for each prediction call.</div> These are **advanced knobs**. For general analysis, call <span class="mono">predict</span>, <span class="mono">predict_maxfit</span>, or <span class="mono">predict_grid</span> without the options argument; each method uses suitable defaults. To customize a run, pass the matching object: [[#PredictOptions|PredictOptions]] with <span class="mono">predict</span>, [[#MaxFitOptions|MaxFitOptions]] with <span class="mono">predict_maxfit</span>, or [[#GridOptions|GridOptions]] with <span class="mono">predict_grid</span>. MaxFitOptions and GridOptions **extend** PredictOptions: the same shared fields, with respective relevant options key-values. ```mermaid classDiagram direction TB class PredictOptions { shared base fields } class MaxFitOptions { +objective +inner_parallel } class GridOptions { +max_iter +k +seed +attribute_combi +adjust_impact_for_missing +retain_grid_objects +inner_parallel } PredictOptions <|-- MaxFitOptions PredictOptions <|-- GridOptions ``` ## PredictOptions Settings for <span class="mono">predict</span>. Also the shared base inherited by MaxFitOptions and GridOptions. **Call:** `predict` **Type:** `PredictOptions` **Defaults when omitted:** threshold `[0.5]`; `censor_type` `relevance`; `censor_unit` `percent`; `censor_operator` `gte` ```text PredictOptions ├── threshold ├── censor_type, censor_unit, censor_operator ├── prediction_scale ├── adj_fit_multiplier, inv_method └── missing_moments, include_linear_regression, verbose ``` Field details: | Name | Type / values | Default | Description | | --- | --- | --- | --- | | <span class="mono">threshold</span> | vector, length ≥ 1 | <span class="mono">[0.5]</span> | Censor cut(s); becomes T on results | | <span class="mono">censor_type</span> | <span class="mono">relevance</span> \| <span class="mono">similarity</span> | <span class="mono">relevance</span> | Score that is thresholded. <span class="mono">both</span> is invalid here | | <span class="mono">censor_unit</span> | <span class="mono">score</span> \| <span class="mono">percent</span> | <span class="mono">percent</span> | Raw score vs percentile | | <span class="mono">censor_operator</span> | <span class="mono">gt</span> \| <span class="mono">lt</span> \| <span class="mono">gte</span> \| <span class="mono">lte</span> | <span class="mono">gte</span> | How the cut compares to the score | | <span class="mono">prediction_scale</span> | <span class="mono">response</span> \| <span class="mono">logistic</span> | <span class="mono">response</span> | Prediction on y scale or logistic scale | | <span class="mono">adj_fit_multiplier</span> | <span class="mono">identity</span> \| <span class="mono">K</span> \| <span class="mono">log</span> | <span class="mono">K</span> | How adjusted fit is scaled | | <span class="mono">inv_method</span> | <span class="mono">gaussian</span> \| <span class="mono">cholesky</span> \| <span class="mono">pseudoinverse</span> | <span class="mono">gaussian</span> | Covariance inversion method | | <span class="mono">missing_moments</span> | <span class="mono">pairwise</span> \| <span class="mono">complete</span> | <span class="mono">pairwise</span> | How μ, Σ, and PSR N treat NaNs. Incomplete <span class="mono">X</span> rows still get weight 0; this does not drop them from ŷ. <span class="mono">complete</span> is listwise. Alias: <span class="mono">verify_missing_data</span> on → <span class="mono">complete</span> | | <span class="mono">include_linear_regression</span> | on / off | off | Attach optional <span class="mono">yhat_linear</span> when available | | <span class="mono">verbose</span> | on / off | off | Diagnostic status messages | > [!note]- Percentile algorithm > When <span class="mono">censor_unit</span> is <span class="mono">percent</span>, a process-wide percentile algorithm also applies (<span class="mono">full_sort</span> or <span class="mono">order_statistics</span>). It is not a field on the options object. See [[Settings/Allowed Values#Percentile algorithm|Allowed values]]. ## MaxFitOptions Settings for <span class="mono">predict_maxfit</span>. Includes all [[#PredictOptions|PredictOptions]] fields, with MaxFit-oriented defaults for threshold and censor type. **Call:** `predict_maxfit` **Type:** `MaxFitOptions` **Inherits:** [[#PredictOptions|PredictOptions]] ```text MaxFitOptions ├── …PredictOptions ├── threshold, censor_type (MaxFit defaults) ├── objective └── inner_parallel ``` MaxFit-specific options and overridden defaults: | Name | Type / values | Default | Description | | --- | --- | --- | --- | | <span class="mono">threshold</span> | vector, length ≥ 1 | <span class="mono">[0, 0.2, 0.5, 0.8]</span> | Candidate thresholds to search | | <span class="mono">censor_type</span> | <span class="mono">relevance</span> \| <span class="mono">similarity</span> \| <span class="mono">both</span> | <span class="mono">both</span> | <span class="mono">both</span> allowed (unlike Predict) | | <span class="mono">objective</span> | <span class="mono">fit</span> \| <span class="mono">adjusted_fit</span> \| <span class="mono">kfit</span> | <span class="mono">kfit</span> | Score used to pick the winning threshold | | <span class="mono">inner_parallel</span> | <span class="mono">auto</span> \| <span class="mono">off</span> | <span class="mono">auto</span> | Within-call parallel when searching both censor types | Other PredictOptions fields keep the Predict defaults unless you override them. ## GridOptions Settings for <span class="mono">predict_grid</span>. Includes [[#PredictOptions|PredictOptions]] fields except <span class="mono">missing_moments</span>, with Grid-oriented defaults for threshold and censor type. **Call:** `predict_grid` **Type:** `GridOptions` **Inherits:** [[#PredictOptions|PredictOptions]] (except <span class="mono">missing_moments</span>) ```text GridOptions ├── …PredictOptions (not missing_moments) ├── threshold, censor_type (Grid defaults) ├── max_iter, k, seed ├── attribute_combi ├── adjust_impact_for_missing ├── retain_grid_objects │ ├── yhat_cells, adjusted_fit_cells, n_cells, weights_cells │ ├── k_cells, combi_cells │ └── ysolo_distribution └── inner_parallel ``` Grid-specific options and overridden defaults: | Name | Type / values | Default | Description | | --- | --- | --- | --- | | <span class="mono">threshold</span> | vector, length ≥ 1 | <span class="mono">[0, 0.2, 0.5, 0.8]</span> | Thresholds used inside each cell | | <span class="mono">censor_type</span> | <span class="mono">relevance</span> \| <span class="mono">similarity</span> \| <span class="mono">both</span> | <span class="mono">both</span> | <span class="mono">both</span> allowed | | <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 on Fit** / **Impact on Prediction** vs uninformative noise at that column's scale (same missing rows). Off is the old include-versus-exclude baseline. Complete columns, composite ŷ, fit, variable weights, and CCTP are unchanged | | <span class="mono">retain_grid_objects</span> | omit \| comma-separated keys | omit (lean) | Which per-cell objects to keep (see below) | | <span class="mono">inner_parallel</span> | <span class="mono">auto</span> \| <span class="mono">off</span> | <span class="mono">auto</span> | Parallel over attribute combinations | Grid does **not** take <span class="mono">missing_moments</span> (or the <span class="mono">verify_missing_data</span> alias). It chooses complete vs pairwise moments per combination: holey selected columns use listwise complete-case; combinations of complete columns stay pairwise. Other PredictOptions fields keep the Predict defaults unless you override them. ### Retain grid objects Set <span class="mono">retain_grid_objects</span> on <span class="mono">GridOptions</span> to the specific keys you need. Omit it (the default) for a lean composite. Name only the objects you intend to inspect; that keeps memory intentional. Controls which per-combination payloads appear on [[Results/Grid Cells|Grid Cells]]. **Impact on Fit**, **Impact on Prediction**, variable weights, and CCTP do **not** require retain. Two keys also turn on extra work, not only extra copies: | Key | Unlocks | Typical shape | | --- | --- | --- | | <span class="mono">yhat_cells</span> | Per-censor cell predictions | Q × T | | <span class="mono">adjusted_fit_cells</span> | Per-censor cell adjusted fit | Q × T | | <span class="mono">n_cells</span> | Per-censor cell counts | Q × T | | <span class="mono">weights_cells</span> | Per-censor cell observation weights (also stores N×T weights instead of streaming them) | 3-D ≈ (N, T, Q) | | <span class="mono">k_cells</span> | Shared per-combination k-related values | Q × T | | <span class="mono">combi_cells</span> | Shared combination membership / design | Q × K | | <span class="mono">ysolo_distribution</span> | Computes solo payloads and keeps them: pooled histogram, composite σ, <span class="mono">xi_solo_composite</span>, and cell solo tables | histogram + N / N×Q / N×T×Q | Example: <span class="mono">retain_grid_objects="yhat_cells,k_cells,combi_cells"</span> <span class="mono">ysolo_distribution</span> is not the same as enabling a histogram on every inner cell. Inner Grid predict skips per-cell binning; this key computes <span class="mono">y_solo</span> / ξ once per cell, keeps <span class="mono">ysolo_cells</span> (N × Q), and bins **one** pooled histogram after the search. Lean Grid (omit retain) skips that work. Shapes and nesting: [[Results/Grid Cells|Grid Cells]] · [[Results/Solo Distribution|Solo Distribution]]. --- <div class="btn-row center"> <a class="btn-primary" href="/Settings/Allowed%20Values">Allowed values</a> <a class="btn-ghost" href="/Results/Grid%20Cells">Grid Cells</a> </div> ## Related - [[Predict]] · [[MaxFit]] · [[Grid Prediction]] - [[Settings/Allowed Values|Allowed values]] - [[Results/Overview|Results]] > [!warning]- C ABI / native integrators > Option names, defaults, and retain knobs here follow the thin clients. The C ABI may expose different symbols, flag names, or ownership rules. Integration engineers should pin and follow the public header contract rather than this chapter alone: [[Install/Native Runtime|Native Runtime]] · [C ABI on GitHub](https://github.com/CambridgeSportsAnalytics/rbp-math-c-abi).