
Choose a threshold by trying every method and scoring the cuts alike
Source:R/adaptive-thresholds.R
best_threshold.RdChoose a threshold by trying every method and scoring the cuts alike
Arguments
- x
transformed values for one marker within the parent gate.
- ladder
smoothing windows for the mindensity sweep, widest last.
- bins
histogram resolution for the mindensity sweep. Default
400L.- min_quality
a candidate must sit in a trough at least this deep to be preferred over the tail rule. Default
0.05.- fallback_q
quantile used only when nothing else is usable.
- floor
no candidate at or below this value is considered; see
density_valley(). Default-Inf.- prefer
"deepest"(default) scores every candidate by the trough it sits in."lowest", for a gate that removes only the negative mode, takes the lowest density valley that sits in a real trough, and falls back to the scored choice when no valley does; seedensity_valley().- tail
"upper"(default, also meaning nothing was declared) offers a tail gate on either side of the dominant mode and lets the trough decide;"lower", the analyst's declaration that the dominant mode is positive (thresholds: <marker>: {tail: lower}), offers only the lower one and takes it as the last resort too, as the default path does. Without this the declaration was ignored under--adaptive-gates.