Determines which extrema should be considered spurious using various criteria. Provides more sophisticated classification than a simple hop_idx threshold.
Usage
classify.spurious.extrema(
hop_indices,
values = NULL,
method = c("threshold", "quantile", "outlier", "combined"),
threshold = 2,
quantile_level = 0.25,
verbose = FALSE
)Arguments
- hop_indices
Numeric vector of hop indices for all extrema
- values
Optional numeric vector of function values at extrema
- method
Character string specifying classification method:
"threshold": hop_idx <= threshold (default, backward compatible)
"quantile": hop_idx <= quantile(hop_idx, probs = quantile_level)
"outlier": statistical outlier detection based on hop_idx distribution
"combined": uses both threshold and relative criteria
- threshold
Numeric threshold for "threshold" and "combined" methods (default 2)
- quantile_level
Quantile level for "quantile" method (default 0.25)
- verbose
Logical; print diagnostic information (default FALSE)