European Parliament MCP Server API - v1.3.9
    Preparing search index...

    Function findOutlierWeeks

    • Find weeks whose rateKey value has a z-score ≥ threshold against the baseline computed across all buckets (the MEP's own rolling baseline within the period).

      Parameters

      • buckets: WeekBucket[]

        Output of bucketByWeek.

      • rateKey: "defectionRate" | "abstentionRate"

        Which rate to evaluate ('defectionRate' or 'abstentionRate').

      • threshold: number = DEFAULT_Z_SCORE_THRESHOLD

        Minimum z-score that triggers an anomaly (default DEFAULT_Z_SCORE_THRESHOLD).

      Returns OutlierWeek[]

      Outlier weeks (chronological order).