<div class="section-label"><span class="num">03</span> Predict</div>
<div class="section-title"><em>Partial-sample regression</em> at thresholds you choose.</div>
Predict is the core evaluation inside Relevance-Based Prediction: a relevance-weighted average of past outcomes at one or more censoring thresholds you specify. In research terms this is **partial-sample regression**: focus on the informative, relevant subset rather than treating every past case the same way.
It is also the building block inside [[Grid Prediction|Grid]] (each cell) and inside [[MaxFit]]. For primary analysis, prefer Grid. Use Predict when the attribute set and thresholds are already fixed, or when you are diagnosing a single calibration.
<p> </p>
## When to use Predict
- You already know the attribute columns and the threshold(s) you want
- You need a transparent single-calibration forecast and its diagnostics
- You are studying or validating the building block that Grid and MaxFit wrap
> [!tip]
> Starting a new analysis? Use [[Grid Prediction]] instead. Predict remains the right tool for a fixed setup, not the default path for day-to-day RBP work.
> [!note]
> Predict accepts censoring on **relevance** or **similarity** only, not both at once. To compare both in one run, use MaxFit or Grid.
## What you call
```text
predict(
y, # outcomes, length N
X, # attributes, N × K
theta, # circumstances, length K
options? # optional; omit → defaults
) → prediction results
```
In every binding, rows are observations and columns are variables. How the matrix is stored in memory is handled for you by the package you use.
## What you pass in
| Name | Shape | Meaning |
| --- | --- | --- |
| <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 | The circumstance you want a prediction for |
| <span class="mono">options</span> | (optional) | <span class="mono">PredictOptions</span>; see [[Config/Options#PredictOptions\|PredictOptions]] |
If you omit options, Predict uses defaults such as threshold <span class="mono">[0.5]</span>, censor type relevance, and unit percent.
## Settings that matter
Full field list: [[Config/Options#PredictOptions|PredictOptions]].
- <span class="mono">threshold</span>: one or more cut values
- <span class="mono">censor_type</span>: <span class="mono">relevance</span> or <span class="mono">similarity</span>
- <span class="mono">censor_unit</span> / <span class="mono">censor_operator</span>: how the threshold is interpreted
- <span class="mono">prediction_scale</span>, <span class="mono">adj_fit_multiplier</span>, <span class="mono">inv_method</span>
- Flags such as <span class="mono">include_linear_regression</span> and <span class="mono">verbose</span>
## What you get back
A **PredictionResults** object (thin clients: Python / R). After a successful run, core forecast measures sit on the root (<span class="mono">result.yhat</span>, <span class="mono">result.fit</span>, <span class="mono">result.adjusted_fit</span>, …). See [[Results/Core|Core]].
Predict usually also fills nested groups: <span class="mono">prediction_weights</span>, <span class="mono">insights</span>, <span class="mono">auxiliary</span>, and <span class="mono">solo_distribution</span>. See [[Results/Weights & Insights|Weights & Insights]] and [[Results/Solo Distribution|Solo Distribution]].
<div class="btn-row center">
<a class="btn-primary" href="/Functions/Grid%20Prediction">Prefer Grid Prediction</a>
<a class="btn-ghost" href="/Results/Overview">Read results</a>
</div>
## Related
- [[Grid Prediction]]: primary analysis path (recommended)
- [[MaxFit]]: search thresholds on a fixed attribute set
- [[Relevance Metrics]]: scores without a full prediction