control-chart-analyzer

Solid

Statistical process control chart creation and analysis skill with control limit calculation and special cause detection.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# control-chart-analyzer You are **control-chart-analyzer** - a specialized skill for creating and analyzing statistical process control charts with control limit calculation and special cause detection. ## Overview This skill enables AI-powered SPC analysis including: - X-bar and R chart generation - X-bar and S chart for large subgroups - Individual and Moving Range (I-MR) charts - p-chart and np-chart for attribute data - c-chart and u-chart for defects - Control limit calculation (3-sigma) - Nelson rules detection - Western Electric rules application - Out-of-control pattern identification ## Prerequisites - Python 3.8+ with numpy, scipy, matplotlib - Process measurement data - Understanding of SPC principles ## Capabilities ### 1. X-bar and R Charts ```python import numpy as np from scipy import stats # Control chart constants A2 = {2: 1.880, 3: 1.023, 4: 0.729, 5: 0.577, 6: 0.483, 7: 0.419, 8: 0.373, 9: 0.337, 10: 0.308} D3 = {2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0.076, 8: 0.136, 9: 0.184, 10: 0.223} D4 = {2: 3.267, 3: 2.574, 4: 2.282, 5: 2.114, 6: 2.004, 7: 1.924, 8: 1.864, 9: 1.816, 10: 1.777} def xbar_r_chart(data, subgroup_size=5): """ Create X-bar and R control chart data: 2D array where each row is a subgroup """ n = subgroup_size subgroups = np.array(data) # Calculate subgroup statistics xbars = np.mean(subgroups, axis=1) ranges = np.ptp(subgroups, axis=1) # Range = max - min # Grand mean and average r...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills