Q Residual Gate
Flag samples exceeding a caller-selected Q-residual model-fit limit.
Description
Q-residual gates compare already computed model-fit residuals with a maximum.
Q-residual gates compare already computed model-fit residuals with a maximum. The largest residual helps summarize the supplied cohort.1
Flag samples exceeding a caller-selected Q-residual model-fit limit.
When to use Q Residual Gate
Use this tool to flag samples exceeding a caller-selected Q-residual model-fit limit.
Prepare the measured profile, formula counts, upstream model outputs or caller-defined reference criteria requested. Keep paired entries aligned and units, sample basis and preprocessing consistent.
How to use Q Residual Gate and understand its results
- Prepare the measured profile, formula counts, upstream model outputs or caller-defined reference criteria requested. Keep paired entries aligned and units, sample basis and preprocessing consistent.
- Enter qResiduals, maximumResidual using the field table and calculation rules, then run the tool.
- Read flaggedIndexes, largestResidual. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| qResiduals | Q residuals | list of number | Required |
| maximumResidual | Maximum residual | number | Required |
Enter a nonempty nonnegative residual list and nonnegative maximum. Return zero-based flagged indexes and largest value; equality is not flagged.
flagged={i:Q_i>maximum}; largest=max(Q) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| flaggedIndexes | Flagged indexes | list of number |
| largestResidual | Largest residual | number |
{
"input": {
"qResiduals": [
1,
4,
2
],
"maximumResidual": 3
},
"output": {
"flaggedIndexes": [
1
],
"largestResidual": 4
}
} Limitations and assumptions
No PCA/PLS model, residual computation or cutoff estimation is performed.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Lists are limited to 100,000 entries; the rules above may require smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Hotelling T2 Outlier: Detect PCA outliers by covariance-adjusted Hotelling T², not Euclidean radius. For a complementary task, use VIP Threshold Gate: Gate variable-importance scores against a supplied VIP minimum.
References
-
Q Residual Gate — tool.io
Similar or alternative tools
- Hotelling T2 Outlier
Detect PCA outliers by covariance-adjusted Hotelling T², not Euclidean radius.
- VIP Threshold Gate
Gate variable-importance scores against a supplied VIP minimum.