Combined outlier detection using multiple methods
Source:R/mt_combined_outliers.R
mt_combined_outliers.RdRuns the simultaneous method (with gap and entropy thresholds) and
the sequential scan, then combines their votes. A location flagged
by at least min_votes methods is declared an outlier.
Usage
mt_combined_outliers(
x,
reference = NULL,
min_votes = 2,
scan = "forward-backward",
time_normalize = TRUE,
plot = FALSE,
...
)Arguments
- x
A
move2object.- reference
Optional
move2object for reference distributions.- min_votes
Minimum number of methods (out of 3) that must flag a location for it to be declared an outlier. Default: 2 (majority vote).
- scan
Scanning strategy for the sequential method:
"forward-backward","greedy", or"random".- time_normalize
Logical; if TRUE (default), use speed and angular velocity.
- plot
Logical; if TRUE, plot the results.
- ...
Additional arguments passed to
mt_flag_outliersandmt_sequential_outliers.
Value
The input move2 object with added columns:
is_outlier, vote_count (0–3), and the individual
method flags flag_gap, flag_entropy, flag_seq.
Details
Relationship to the four-primitive cascade. This function
votes across three strategies on a single detector (the
joint-probability surface from mt_flag_outliers):
simultaneous-with-gap, simultaneous-with-entropy, and the
sequential scan from mt_sequential_outliers. The
unified cleaner mt_clean_track is a different
construction: it votes across four detectors (bridge,
detour, probability, speed-cap), each looking at a different
grain of the data. The two are not redundant – the cascade
cannot reach inside a single detector to compare simultaneous vs
sequential evaluation. Reach for mt_combined_outliers
when you want to inspect the per-strategy agreement on the
probability surface specifically, or when calibrating thresholds
on that surface and wanting cross-strategy validation. For
routine cleaning, mt_clean_track is the recommended
entry-point.
References
Safi, K. (in preparation). Self-thresholding hierarchical outlier-detection for animal movement tracks. Companion paper to the move2utils R package. Preprint: bioRxiv (DOI forthcoming).
See also
mt_clean_track (recommended unified
cleaner; votes across four detectors rather than three
strategies on one detector); mt_flag_outliers
(the probability primitive this function votes strategies on);
mt_sequential_outliers (one of the three voted
strategies); mt_persistence_score (multi-scale
persistence annotation that can be applied to this function's
output for additional confidence quantification).
Examples
if (FALSE) { # \dontrun{
## Majority-vote flagging across three detection strategies:
res <- mt_combined_outliers(track, min_votes = 2,
scan = "forward-backward")
table(res$vote_count)
} # }