Skip to content

feat: add Western Electric Rules for control chart pattern detection#107

Merged
devcrocod merged 1 commit intomasterfrom
feat/western-electric-rules
Apr 23, 2026
Merged

feat: add Western Electric Rules for control chart pattern detection#107
devcrocod merged 1 commit intomasterfrom
feat/western-electric-rules

Conversation

@devcrocod
Copy link
Copy Markdown
Member

Description

Add the four Western Electric Rules (WER) for detecting non-random patterns on control charts: single point beyond ±3σ, 2-of-3 beyond ±2σ same side, 4-of-5 beyond ±1σ same side, and 8 consecutive points on the same side of the center line. Complements the existing Shewhart, CUSUM, and EWMA charts by increasing sensitivity to small sustained shifts.

Closes #38

Testing

./gradlew :kstats-core:jvmTest — 65 new tests covering basic correctness, edge cases, degenerate/NaN/±Infinity inputs, property-based invariants, and Iterable/Sequence overloads.

Checklist

  • Existing tests pass
  • New/updated tests for changed behavior
  • New/updated documentation if necessary

@devcrocod devcrocod merged commit ae6146f into master Apr 23, 2026
3 checks passed
@devcrocod devcrocod deleted the feat/western-electric-rules branch April 23, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Western Electric Rules for control chart pattern detection

1 participant