Per-category handler: sliding-window work tracking and outlier detection.
This module backs each aequitas category. Its public functions are internal
to the library; the externally relevant surface is the
setting_opt/0 and ask_opt/0 types referenced by aequitas.
References
- Standard Score / Z-Score (Wikipedia)
- T-Score vs. Z-score (statisticshowto.com)
- Detection of Outliers (NIST)
- Robust measures of scale (Wikipedia)
- Anomaly Detection with Robust Zscore (pkghosh.wordpress.com)
- Three ways to detect outliers (colingorrie.github.io)
- Interquartile range (Wikipedia)
Summary
Types
-type ask_opt() :: {weight, pos_integer()} | {min_actor_count, pos_integer()} | {iqr_factor, number()} | return_stats.
-type coll_limiter() :: #coll_limiter{capacity :: non_neg_integer() | infinity, accepted :: non_neg_integer(), rejected :: non_neg_integer(), desire_history :: non_neg_integer(), desire_history_size :: non_neg_integer()}.
-type setting_opt() :: {max_window_size, pos_integer() | infinity} | {max_window_duration, aequitas_time_interval:t() | infinity} | {min_actor_count, pos_integer()} | {iqr_factor, number()} | {max_collective_rate, non_neg_integer()}.
-type settings() :: #settings{max_window_size :: pos_integer() | infinity, max_window_duration :: pos_integer() | infinity, min_actor_count :: pos_integer(), iqr_factor :: number(), max_collective_rate :: non_neg_integer() | infinity}.
-type work() :: #work{actor_id :: term(), weight :: pos_integer(), timestamp :: integer()}.