Module Algostream_analytics.Outlier

Outlier-detection pipeline.

Filters compose left-to-right; the first Reject short-circuits. Order matters: Sanity must always come first to prevent NaN/Inf from poisoning later moment-based filters.

type verdict =
  1. | Pass
  2. | Reject of {
    1. reason : string;
    2. severity : int;
    }
module type FILTER = sig ... end
module Sanity : FILTER
val sanity : Sanity.t
module Z_score : sig ... end
module Hampel : sig ... end
type runner = float -> verdict

Wrap a concrete filter into an opaque update function.

val wrap : (module FILTER with type t = 't) -> 't -> runner
val run : runner list -> float -> verdict

Run the chain in order; returns the first Reject, else Pass.