DaSPi 2.0.0__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- daspi-2.2.0/PKG-INFO +340 -0
- daspi-2.2.0/README.md +323 -0
- daspi-2.2.0/daspi/__init__.py +175 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/anova/model.py +113 -33
- {daspi-2.0.0 → daspi-2.2.0}/daspi/anova/tables.py +16 -2
- {daspi-2.0.0 → daspi-2.2.0}/daspi/constants.py +1 -1
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/plotter.py +27 -13
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/styles/daspi-dark.mplstyle +4 -4
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/styles/daspi.mplstyle +4 -4
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/styles/ggplot2.mplstyle +4 -4
- {daspi-2.0.0 → daspi-2.2.0}/pyproject.toml +1 -1
- {daspi-2.0.0 → daspi-2.2.0}/tests/anova_model_test.py +22 -2
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_alignments_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_all_alignments.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_angles_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_callable_formatters.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_combined_all_features.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_extreme_angles.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_formatters_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_formatters_scientific.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_multivariate_formatting.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_orientation_mapping.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Formatting_Features_Test_percentage_formatter.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_comparison_with_violin.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_custom_color.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_custom_width.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_joint_chart_mixed_plots.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_multivariate_chart_facets.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_resolution_high.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_horizontal.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_no_fade.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_no_fill.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_with_hue.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_bar_stacking.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_pareto_marked.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_probability_dists-prob.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_regression_kde.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/MultivariateChart_full-stripes.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/MultivariateChart_full.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_bivariate-univariate-charts_contour-mean-test.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_bivariate-univariate-charts_mean-test.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_bivariate-univariate-charts_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_bivariate-univariate-charts_smoothed.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_bivariate-univariate-charts_user.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_pair_comparison_charts_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_parameter_relevance_charts_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_process-capabity-analysis-charts_hue.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_residual_charts_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_KDE_multiple.png +0 -0
- daspi-2.2.0/tests/charts/SingleChart_KDE_ridge.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_beeswarm_multiple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_beeswarm_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_blandaltman_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_blandaltman_user.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_box_fill.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_box_multiple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_box_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_categorical-float-features_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_errorbar_mean-test.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_errorbar_sem.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_errorbar_std-test.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_errorbar_var-test.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_jitter_multiple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_jitter_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_line_hue.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_line_hue_size.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_pareto_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_pareto_transposed.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_quantiles_multiple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_quantiles_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_full.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_hue-shape.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_hue-size.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_hue.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_shape.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_size-shape.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_size.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violin_mono.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violin_multiple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violin_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_visual_test.py +32 -0
- daspi-2.0.0/PKG-INFO +0 -213
- daspi-2.0.0/README.md +0 -196
- daspi-2.0.0/daspi/__init__.py +0 -376
- {daspi-2.0.0 → daspi-2.2.0}/LICENSE +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/_typing.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/_version.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/anova/__init__.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/anova/convert.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/config.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/__init__.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/ancova.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/anova.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/anova2.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/anova2_unbalanced.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/anova3.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/anova3_unbalanced.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/carpet_full-factorial.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/covariate.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/drop_card.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/eeprom_full-factorial.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/eeprom_partial-factorial.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/grnr_adjustment.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/grnr_layer_thickness.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/grnr_spc.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/iris.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/mpg.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/painkillers-dissolution.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/partial_factorial.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/penguins.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/process_capability.mpx +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/salt_sticks.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/shoe-sole.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/datasets/tips.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/doe/__init__.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/doe/build.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/__init__.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/appearance.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/chart.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/classify.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/facets.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/precast.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/plotlib/styles/seaborn.mplstyle +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/requirements.txt +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/statistics/__init__.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/statistics/confidence.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/statistics/estimation.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/statistics/hypothesis.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/statistics/montecarlo.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/daspi/strings.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/ANOVA_SS_Fehler.mpx +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/ANOVA_SS_Fehler.mpx.bak +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/GageRnR.mpx +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/GageRnR.mpx.bak +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/__init__.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/anova_convert_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/anova_tables_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_kdes_kde-mean.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_kdes_mixed-kde.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/JointChart_probability_norm-prob.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_gage_rnr_model_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/Precasts_gage_study_model_basic.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_KDE_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_simple-stripes-65ci.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_simple-stripes-99ci.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_simple-stripes.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_scatter_transposed.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violine-contour_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violine_mono.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violine_multiple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/charts/SingleChart_violine_simple.png +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/config_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/anova3_result.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/dists_10-samples.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/dists_25-samples.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/gage_rnr.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/gage_study.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/generate_dists.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/grnr_d-optimal.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/data/uncertainties.csv +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/doe_build_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_appearance_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_chart_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_classify_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_facets_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_plotter_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/plotlib_templates_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/r2_pred.mpx +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/r2_pred.mpx.bak +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/statistics_confidence_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/statistics_estimation_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/statistics_hypothesis_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/statistics_montecarlo_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/strings_test.py +0 -0
- {daspi-2.0.0 → daspi-2.2.0}/tests/test_full_factorial_design_builder.py +0 -0
daspi-2.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: DaSPi
|
|
3
|
+
Version: 2.2.0
|
|
4
|
+
Summary: Visualize and analyze your data with DaSPi. This package is designed for users who want to find relevant influencing factors in processes and validate improvements.
|
|
5
|
+
Author-Email: =?utf-8?q?Reto_J=C3=A4ggli?= <reto@jaeggli.email>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/j4ggr/DaSPi
|
|
8
|
+
Project-URL: Documentation, https://j4ggr.github.io/DaSPi/
|
|
9
|
+
Project-URL: Changelog, https://j4ggr.github.io/DaSPi/CHANGELOG
|
|
10
|
+
Requires-Python: >=3.13
|
|
11
|
+
Requires-Dist: matplotlib>=3.11.0
|
|
12
|
+
Requires-Dist: pandas>=3.0.3
|
|
13
|
+
Requires-Dist: statsmodels>=0.14.6
|
|
14
|
+
Requires-Dist: scipy>=1.18.0
|
|
15
|
+
Requires-Dist: numpy>=2.5.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
# DaSPi — Process Analytics & Six Sigma in Python
|
|
25
|
+
|
|
26
|
+
DaSPi helps engineers analyze and improve processes using statistical workflows.
|
|
27
|
+
|
|
28
|
+
## 🎯 The Problem
|
|
29
|
+
|
|
30
|
+
Process analysis in practice is fragmented:
|
|
31
|
+
|
|
32
|
+
- Excel is error-prone and hard to scale
|
|
33
|
+
- Minitab / JMP are expensive and closed
|
|
34
|
+
- Python tools (pandas, scipy, statsmodels) are powerful but disconnected
|
|
35
|
+
|
|
36
|
+
👉 Engineers spend more time combining tools than improving processes.
|
|
37
|
+
|
|
38
|
+
## ✅ The Solution
|
|
39
|
+
|
|
40
|
+
DaSPi provides **integrated workflows for process analytics**:
|
|
41
|
+
|
|
42
|
+
- Capability analysis (Cp, Cpk)
|
|
43
|
+
- Root cause analysis (ANOVA, regression)
|
|
44
|
+
- Statistical process control (SPC)
|
|
45
|
+
- Professional visualization
|
|
46
|
+
|
|
47
|
+
All in one consistent and intuitive interface.
|
|
48
|
+
|
|
49
|
+
## 🚀 Four Flagship Workflows
|
|
50
|
+
|
|
51
|
+
DaSPi provides **four ready-to-use workflows** that cover the complete quality cycle. Each workflow produces **visual output + interpretation** in under 20 lines of code.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### 📏 Workflow 1: Gage R&R Analysis
|
|
56
|
+
|
|
57
|
+
**Verify your measurement system is capable before analyzing process data.**
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
import daspi as dsp
|
|
61
|
+
|
|
62
|
+
# Load data
|
|
63
|
+
df = dsp.load_dataset("grnr_layer_thickness")
|
|
64
|
+
|
|
65
|
+
# Step 1: Evaluate the gage itself (MSA Type 1)
|
|
66
|
+
gage = dsp.GageStudyModel(
|
|
67
|
+
source=df,
|
|
68
|
+
target="result_gage",
|
|
69
|
+
reference="reference",
|
|
70
|
+
u_cal=df["U_cal"][0],
|
|
71
|
+
tolerance=df["tolerance"][0],
|
|
72
|
+
resolution=df["resolution"][0]
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Step 2: Evaluate repeatability & reproducibility (MSA Type 2)
|
|
76
|
+
model = dsp.GageRnRModel(
|
|
77
|
+
source=df,
|
|
78
|
+
target="result_rnr",
|
|
79
|
+
part="part",
|
|
80
|
+
gage=gage,
|
|
81
|
+
u_av="operator" # Operator variation
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Step 3: Visualize complete analysis
|
|
85
|
+
chart_gage = dsp.GageStudyCharts(
|
|
86
|
+
gage,
|
|
87
|
+
stretch_figsize=1.5
|
|
88
|
+
).plot(
|
|
89
|
+
).stripes(
|
|
90
|
+
).label(
|
|
91
|
+
fig_title='Gage Study Layer Thickness Measurement System',
|
|
92
|
+
sub_title='Measurement System Analysis (MSA Type 1)',
|
|
93
|
+
info=True)
|
|
94
|
+
|
|
95
|
+
chart_rnr = dsp.GageRnRCharts(
|
|
96
|
+
model,
|
|
97
|
+
spread_accepted_limit=0.1, # 10% threshold for acceptance
|
|
98
|
+
spread_rejected_limit=0.3, # 30% threshold for rejection
|
|
99
|
+
u_accepted_limit=0.15, # 15% uncertainty threshold
|
|
100
|
+
stretch_figsize=1.5
|
|
101
|
+
).plot(
|
|
102
|
+
).stripes( # Adds acceptance zones
|
|
103
|
+
).label(
|
|
104
|
+
fig_title='Gage R&R Layer Thickness Measurement System',
|
|
105
|
+
sub_title='Measurement System Analysis (MSA Type 2)',
|
|
106
|
+
info=True)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Output:** Comprehensive measurement system evaluation with repeatability (EV), reproducibility (AV), variance components, ANOVA tables, and capability indices (Cg, Cgk).
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### 📊 Workflow 2: Process Capability Analysis
|
|
114
|
+
|
|
115
|
+
**Evaluate if your process meets specifications.**
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import daspi as dsp
|
|
119
|
+
|
|
120
|
+
# Load data
|
|
121
|
+
df = dsp.load_dataset("drop_card")
|
|
122
|
+
spec_limits = dsp.SpecLimits(0, float(df.loc[0, "usl"]))
|
|
123
|
+
|
|
124
|
+
# Analyze capability
|
|
125
|
+
chart = dsp.ProcessCapabilityAnalysisCharts(
|
|
126
|
+
source=df,
|
|
127
|
+
target="distance",
|
|
128
|
+
spec_limits=spec_limits,
|
|
129
|
+
hue="method"
|
|
130
|
+
).plot().stripes().label(
|
|
131
|
+
fig_title="Process Capability Analysis of Drop Card Data",
|
|
132
|
+
sub_title="Drop Card Distance Comparison between Two Methods",
|
|
133
|
+
target_label="Distance s (cm)",
|
|
134
|
+
info=True)
|
|
135
|
+
|
|
136
|
+
chart.show()
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Output:** 5-panel analysis with Cp, Cpk, Pp, Ppk, distribution plots, and statistical interpretation.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### 🔍 Workflow 3: Root Cause Analysis
|
|
144
|
+
|
|
145
|
+
**Identify which factors significantly impact your process.**
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
import daspi as dsp
|
|
149
|
+
|
|
150
|
+
# Load data
|
|
151
|
+
df = dsp.load_dataset("painkillers-dissolution")
|
|
152
|
+
|
|
153
|
+
# Fit model with automatic factor selection
|
|
154
|
+
model = dsp.LinearModel(
|
|
155
|
+
source=df,
|
|
156
|
+
target="dissolution",
|
|
157
|
+
factors=["employee", "brand", "water", "catalyst"],
|
|
158
|
+
covariates=["temperature"],
|
|
159
|
+
order=2,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
# Perform recursive elimination to select significant factors
|
|
163
|
+
df_gof = pd.concat(model.recursive_elimination())
|
|
164
|
+
|
|
165
|
+
# Visualize results
|
|
166
|
+
chart_res = dsp.ResidualsCharts(model).plot().stripes().label(info=True)
|
|
167
|
+
chart_param = dsp.ParameterRelevanceCharts(model).plot().stripes().label(info=True)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Output:** Residual diagnostics + parameter effects with ANOVA tables and significance tests.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### 📈 Workflow 4: Statistical Process Control (SPC)
|
|
175
|
+
|
|
176
|
+
**Monitor process stability and detect out-of-control conditions.**
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
import daspi as dsp
|
|
180
|
+
|
|
181
|
+
# Load process data
|
|
182
|
+
df = dsp.load_dataset("grnr_spc")
|
|
183
|
+
|
|
184
|
+
# Create control chart
|
|
185
|
+
chart = dsp.JointChart(
|
|
186
|
+
source=df,
|
|
187
|
+
target='result',
|
|
188
|
+
feature=('measurement_order', ''),
|
|
189
|
+
nrows=1,
|
|
190
|
+
ncols=2,
|
|
191
|
+
width_ratios=[4, 1],
|
|
192
|
+
sharey=True,
|
|
193
|
+
).plot(
|
|
194
|
+
dsp.Scatter
|
|
195
|
+
).plot(
|
|
196
|
+
dsp.Line,
|
|
197
|
+
on_last_axes=True,
|
|
198
|
+
).plot(
|
|
199
|
+
dsp.GaussianKDE,
|
|
200
|
+
hide_axis='feature',
|
|
201
|
+
visible_spines='target',
|
|
202
|
+
).stripes(
|
|
203
|
+
mean=True,
|
|
204
|
+
control_limits=True, # UCL/LCL at 3-sigma
|
|
205
|
+
agreement=3, # 3-sigma agreement lines
|
|
206
|
+
strategy='norm', # Use normal distribution for control limits
|
|
207
|
+
).label(
|
|
208
|
+
fig_title='SPC Chart: Layer Thickness',
|
|
209
|
+
sub_title='Control limits at ±3σ',
|
|
210
|
+
target_label='Layer Thickness (µm)',
|
|
211
|
+
feature_label=('Measurement Order', ''),
|
|
212
|
+
info=True
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
chart.show()
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Output:** Control chart with mean, control limits (UCL/LCL), specification limits, and trend analysis.
|
|
219
|
+
|
|
220
|
+
## 🏭 Use Cases
|
|
221
|
+
|
|
222
|
+
- **Manufacturing:** Monitor tolerances and reduce defects
|
|
223
|
+
- **Quality Engineering:** Automate Six Sigma DMAIC workflows
|
|
224
|
+
- **Process Optimization:** Identify key drivers of variation
|
|
225
|
+
- **Data Analysts:** Unify statistics and visualization in one tool
|
|
226
|
+
|
|
227
|
+
### 📊 Example Outputs
|
|
228
|
+
|
|
229
|
+
#### MSA1: Gage Study (Single Reference)
|
|
230
|
+
|
|
231
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/gage_study_single_reference.png)
|
|
232
|
+
|
|
233
|
+
#### MSA2: Gage R&R (Repeatability & Reproducibility)
|
|
234
|
+
|
|
235
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/gage_rnr_layer_thickness.png)
|
|
236
|
+
|
|
237
|
+
#### Process Capability Analysis
|
|
238
|
+
|
|
239
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/cpk-analysis_drop-card.png)
|
|
240
|
+
|
|
241
|
+
#### Root Cause Analysis (ANOVA)
|
|
242
|
+
|
|
243
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/anova_dissolution_residues.png)
|
|
244
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/anova_dissolution_params.png)
|
|
245
|
+
|
|
246
|
+
**formula:**
|
|
247
|
+
|
|
248
|
+
dissolution ~ 26.8292 + 2.3750*employee[T.B] + 0.8375*employee[T.C] - 10.7500*brand[T.ZapPain] - 9.5167*water[T.tap] + 5.7167*brand[T.ZapPain]:water[T.tap]
|
|
249
|
+
|
|
250
|
+
**Model Summary:**
|
|
251
|
+
|
|
252
|
+
| | hierarchical | least_parameter | p_least | s | aic | r2 | r2_adj | r2_pred |
|
|
253
|
+
| --- | ------------ | --------------- | -------- | -------- | ---------- | -------- | -------- | -------- |
|
|
254
|
+
| 0 | True | employee | 0.023298 | 2.374693 | 224.835935 | 0.857379 | 0.840400 | 0.813719 |
|
|
255
|
+
|
|
256
|
+
**Parameter statistics:**
|
|
257
|
+
|
|
258
|
+
| | coef | std err | t | p | ci_low | ci_upp |
|
|
259
|
+
| ----------------------------: | ---------: | -------: | ---------: | -------: | ---------: | --------: |
|
|
260
|
+
| Intercept | 26.829167 | 0.839581 | 31.955433 | 0.000000 | 25.134824 | 28.523509 |
|
|
261
|
+
| employee[T.B] | 2.375000 | 0.839581 | 2.828793 | 0.007133 | 0.680657 | 4.069343 |
|
|
262
|
+
| employee[T.C] | 0.837500 | 0.839581 | 0.997522 | 0.324224 | -0.856843 | 2.531843 |
|
|
263
|
+
| brand[T.ZapPain] | -10.750000 | 0.969464 | -11.088598 | 0.000000 | -12.706458 | -8.793542 |
|
|
264
|
+
| water[T.tap] | -9.516667 | 0.969464 | -9.816417 | 0.000000 | -11.473125 | -7.560208 |
|
|
265
|
+
| brand[T.ZapPain]:water[T.tap] | 5.716667 | 1.371030 | 4.169616 | 0.000149 | 2.949817 | 8.483516 |
|
|
266
|
+
|
|
267
|
+
**Analysis of variance:**
|
|
268
|
+
|
|
269
|
+
| Typ-I | DF | SS | MS | F | p | n2 |
|
|
270
|
+
| ----------- | ---: | ---------: | ---------: | ---------: | -------: | -------: |
|
|
271
|
+
| employee | 2 | 46.431667 | 23.215833 | 4.116891 | 0.023298 | 0.027960 |
|
|
272
|
+
| brand | 1 | 747.340833 | 747.340833 | 132.526821 | 0.000000 | 0.450027 |
|
|
273
|
+
| water | 1 | 532.000833 | 532.000833 | 94.340328 | 0.000000 | 0.320355 |
|
|
274
|
+
| brand:water | 1 | 98.040833 | 98.040833 | 17.385695 | 0.000149 | 0.059037 |
|
|
275
|
+
| Residual | 42 | 236.845000 | 5.639167 | nan | nan | 0.142621 |
|
|
276
|
+
|
|
277
|
+
**Variance inflation factor:**
|
|
278
|
+
|
|
279
|
+
| | DF | VIF | GVIF | Threshold | Collinear | Method |
|
|
280
|
+
| ----------- | ---: | -------: | -------: | --------: | --------: | ------------------: |
|
|
281
|
+
| Intercept | 1 | 5.000000 | 2.236068 | 2.236068 | True | R_squared |
|
|
282
|
+
| employee | 2 | 1.000000 | 1.000000 | 1.495349 | False | generalized |
|
|
283
|
+
| brand | 1 | 1.000000 | 1.000000 | 2.236068 | False | R_squared |
|
|
284
|
+
| water | 1 | 1.000000 | 1.000000 | 2.236068 | False | R_squared |
|
|
285
|
+
| brand:water | 1 | 1.000000 | 1.000000 | 2.236068 | False | single_order-2_term |
|
|
286
|
+
|
|
287
|
+
#### SPC: Control Chart with Mean, UCL/LCL, Specification Limits
|
|
288
|
+
|
|
289
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/spc_chart_layer_thickness.png)
|
|
290
|
+
|
|
291
|
+
## 🚀 Installation
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
pip install daspi
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
## 📚 Documentation
|
|
298
|
+
|
|
299
|
+
- **[User Guide](https://j4ggr.github.io/DaSPi/guides/)** — Complete tutorials for each workflow
|
|
300
|
+
- **[API Reference](https://j4ggr.github.io/DaSPi/anova/)** — Detailed documentation
|
|
301
|
+
- **[3S Methodology](https://j4ggr.github.io/DaSPi/guides/3s-methodology/)** — Structured problem-solving
|
|
302
|
+
|
|
303
|
+
## 🔧 Technical Features
|
|
304
|
+
|
|
305
|
+
- **Centralized configuration** — Manage language, username, and styles globally
|
|
306
|
+
- **Multivariate visualization** — Explore complex relationships
|
|
307
|
+
- **Linear models & ANOVA** — Statistical inference made simple
|
|
308
|
+
- **Hypothesis testing** — Confidence intervals and p-values
|
|
309
|
+
- **Monte Carlo simulation** — Assess uncertainty
|
|
310
|
+
- **Process capability** — Cp, Cpk, Pp, Ppk calculations
|
|
311
|
+
|
|
312
|
+
## ⚙️ Built on Proven Libraries
|
|
313
|
+
|
|
314
|
+
DaSPi leverages the Python scientific stack:
|
|
315
|
+
|
|
316
|
+
- **pandas** — Data manipulation
|
|
317
|
+
- **numpy** — Numerical computing
|
|
318
|
+
- **matplotlib** — Visualization
|
|
319
|
+
- **scipy** — Statistical functions
|
|
320
|
+
- **statsmodels** — Advanced statistics
|
|
321
|
+
|
|
322
|
+
## 👤 About
|
|
323
|
+
|
|
324
|
+
DaSPi is created and maintained by **Reto Jäggli**, Data Scientist at Festo Microtechnology AG.
|
|
325
|
+
|
|
326
|
+
The project is driven by a passion to make **process analytics and Six Sigma workflows more accessible in Python**.
|
|
327
|
+
|
|
328
|
+
## ⚠️ Disclaimer
|
|
329
|
+
|
|
330
|
+
DaSPi is under active development and may contain bugs.
|
|
331
|
+
Results should be validated with trusted statistical tools when required.
|
|
332
|
+
|
|
333
|
+
## 🤝 Feedback & Contributions
|
|
334
|
+
|
|
335
|
+
**If you use DaSPi in real-world process analysis:**
|
|
336
|
+
👉 I would love to hear your use case.
|
|
337
|
+
|
|
338
|
+
Feedback, ideas, and contributions are very welcome.
|
|
339
|
+
|
|
340
|
+
---
|
daspi-2.2.0/README.md
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
# DaSPi — Process Analytics & Six Sigma in Python
|
|
8
|
+
|
|
9
|
+
DaSPi helps engineers analyze and improve processes using statistical workflows.
|
|
10
|
+
|
|
11
|
+
## 🎯 The Problem
|
|
12
|
+
|
|
13
|
+
Process analysis in practice is fragmented:
|
|
14
|
+
|
|
15
|
+
- Excel is error-prone and hard to scale
|
|
16
|
+
- Minitab / JMP are expensive and closed
|
|
17
|
+
- Python tools (pandas, scipy, statsmodels) are powerful but disconnected
|
|
18
|
+
|
|
19
|
+
👉 Engineers spend more time combining tools than improving processes.
|
|
20
|
+
|
|
21
|
+
## ✅ The Solution
|
|
22
|
+
|
|
23
|
+
DaSPi provides **integrated workflows for process analytics**:
|
|
24
|
+
|
|
25
|
+
- Capability analysis (Cp, Cpk)
|
|
26
|
+
- Root cause analysis (ANOVA, regression)
|
|
27
|
+
- Statistical process control (SPC)
|
|
28
|
+
- Professional visualization
|
|
29
|
+
|
|
30
|
+
All in one consistent and intuitive interface.
|
|
31
|
+
|
|
32
|
+
## 🚀 Four Flagship Workflows
|
|
33
|
+
|
|
34
|
+
DaSPi provides **four ready-to-use workflows** that cover the complete quality cycle. Each workflow produces **visual output + interpretation** in under 20 lines of code.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### 📏 Workflow 1: Gage R&R Analysis
|
|
39
|
+
|
|
40
|
+
**Verify your measurement system is capable before analyzing process data.**
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
import daspi as dsp
|
|
44
|
+
|
|
45
|
+
# Load data
|
|
46
|
+
df = dsp.load_dataset("grnr_layer_thickness")
|
|
47
|
+
|
|
48
|
+
# Step 1: Evaluate the gage itself (MSA Type 1)
|
|
49
|
+
gage = dsp.GageStudyModel(
|
|
50
|
+
source=df,
|
|
51
|
+
target="result_gage",
|
|
52
|
+
reference="reference",
|
|
53
|
+
u_cal=df["U_cal"][0],
|
|
54
|
+
tolerance=df["tolerance"][0],
|
|
55
|
+
resolution=df["resolution"][0]
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Step 2: Evaluate repeatability & reproducibility (MSA Type 2)
|
|
59
|
+
model = dsp.GageRnRModel(
|
|
60
|
+
source=df,
|
|
61
|
+
target="result_rnr",
|
|
62
|
+
part="part",
|
|
63
|
+
gage=gage,
|
|
64
|
+
u_av="operator" # Operator variation
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Step 3: Visualize complete analysis
|
|
68
|
+
chart_gage = dsp.GageStudyCharts(
|
|
69
|
+
gage,
|
|
70
|
+
stretch_figsize=1.5
|
|
71
|
+
).plot(
|
|
72
|
+
).stripes(
|
|
73
|
+
).label(
|
|
74
|
+
fig_title='Gage Study Layer Thickness Measurement System',
|
|
75
|
+
sub_title='Measurement System Analysis (MSA Type 1)',
|
|
76
|
+
info=True)
|
|
77
|
+
|
|
78
|
+
chart_rnr = dsp.GageRnRCharts(
|
|
79
|
+
model,
|
|
80
|
+
spread_accepted_limit=0.1, # 10% threshold for acceptance
|
|
81
|
+
spread_rejected_limit=0.3, # 30% threshold for rejection
|
|
82
|
+
u_accepted_limit=0.15, # 15% uncertainty threshold
|
|
83
|
+
stretch_figsize=1.5
|
|
84
|
+
).plot(
|
|
85
|
+
).stripes( # Adds acceptance zones
|
|
86
|
+
).label(
|
|
87
|
+
fig_title='Gage R&R Layer Thickness Measurement System',
|
|
88
|
+
sub_title='Measurement System Analysis (MSA Type 2)',
|
|
89
|
+
info=True)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Output:** Comprehensive measurement system evaluation with repeatability (EV), reproducibility (AV), variance components, ANOVA tables, and capability indices (Cg, Cgk).
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### 📊 Workflow 2: Process Capability Analysis
|
|
97
|
+
|
|
98
|
+
**Evaluate if your process meets specifications.**
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
import daspi as dsp
|
|
102
|
+
|
|
103
|
+
# Load data
|
|
104
|
+
df = dsp.load_dataset("drop_card")
|
|
105
|
+
spec_limits = dsp.SpecLimits(0, float(df.loc[0, "usl"]))
|
|
106
|
+
|
|
107
|
+
# Analyze capability
|
|
108
|
+
chart = dsp.ProcessCapabilityAnalysisCharts(
|
|
109
|
+
source=df,
|
|
110
|
+
target="distance",
|
|
111
|
+
spec_limits=spec_limits,
|
|
112
|
+
hue="method"
|
|
113
|
+
).plot().stripes().label(
|
|
114
|
+
fig_title="Process Capability Analysis of Drop Card Data",
|
|
115
|
+
sub_title="Drop Card Distance Comparison between Two Methods",
|
|
116
|
+
target_label="Distance s (cm)",
|
|
117
|
+
info=True)
|
|
118
|
+
|
|
119
|
+
chart.show()
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Output:** 5-panel analysis with Cp, Cpk, Pp, Ppk, distribution plots, and statistical interpretation.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### 🔍 Workflow 3: Root Cause Analysis
|
|
127
|
+
|
|
128
|
+
**Identify which factors significantly impact your process.**
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
import daspi as dsp
|
|
132
|
+
|
|
133
|
+
# Load data
|
|
134
|
+
df = dsp.load_dataset("painkillers-dissolution")
|
|
135
|
+
|
|
136
|
+
# Fit model with automatic factor selection
|
|
137
|
+
model = dsp.LinearModel(
|
|
138
|
+
source=df,
|
|
139
|
+
target="dissolution",
|
|
140
|
+
factors=["employee", "brand", "water", "catalyst"],
|
|
141
|
+
covariates=["temperature"],
|
|
142
|
+
order=2,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
# Perform recursive elimination to select significant factors
|
|
146
|
+
df_gof = pd.concat(model.recursive_elimination())
|
|
147
|
+
|
|
148
|
+
# Visualize results
|
|
149
|
+
chart_res = dsp.ResidualsCharts(model).plot().stripes().label(info=True)
|
|
150
|
+
chart_param = dsp.ParameterRelevanceCharts(model).plot().stripes().label(info=True)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Output:** Residual diagnostics + parameter effects with ANOVA tables and significance tests.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### 📈 Workflow 4: Statistical Process Control (SPC)
|
|
158
|
+
|
|
159
|
+
**Monitor process stability and detect out-of-control conditions.**
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
import daspi as dsp
|
|
163
|
+
|
|
164
|
+
# Load process data
|
|
165
|
+
df = dsp.load_dataset("grnr_spc")
|
|
166
|
+
|
|
167
|
+
# Create control chart
|
|
168
|
+
chart = dsp.JointChart(
|
|
169
|
+
source=df,
|
|
170
|
+
target='result',
|
|
171
|
+
feature=('measurement_order', ''),
|
|
172
|
+
nrows=1,
|
|
173
|
+
ncols=2,
|
|
174
|
+
width_ratios=[4, 1],
|
|
175
|
+
sharey=True,
|
|
176
|
+
).plot(
|
|
177
|
+
dsp.Scatter
|
|
178
|
+
).plot(
|
|
179
|
+
dsp.Line,
|
|
180
|
+
on_last_axes=True,
|
|
181
|
+
).plot(
|
|
182
|
+
dsp.GaussianKDE,
|
|
183
|
+
hide_axis='feature',
|
|
184
|
+
visible_spines='target',
|
|
185
|
+
).stripes(
|
|
186
|
+
mean=True,
|
|
187
|
+
control_limits=True, # UCL/LCL at 3-sigma
|
|
188
|
+
agreement=3, # 3-sigma agreement lines
|
|
189
|
+
strategy='norm', # Use normal distribution for control limits
|
|
190
|
+
).label(
|
|
191
|
+
fig_title='SPC Chart: Layer Thickness',
|
|
192
|
+
sub_title='Control limits at ±3σ',
|
|
193
|
+
target_label='Layer Thickness (µm)',
|
|
194
|
+
feature_label=('Measurement Order', ''),
|
|
195
|
+
info=True
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
chart.show()
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Output:** Control chart with mean, control limits (UCL/LCL), specification limits, and trend analysis.
|
|
202
|
+
|
|
203
|
+
## 🏭 Use Cases
|
|
204
|
+
|
|
205
|
+
- **Manufacturing:** Monitor tolerances and reduce defects
|
|
206
|
+
- **Quality Engineering:** Automate Six Sigma DMAIC workflows
|
|
207
|
+
- **Process Optimization:** Identify key drivers of variation
|
|
208
|
+
- **Data Analysts:** Unify statistics and visualization in one tool
|
|
209
|
+
|
|
210
|
+
### 📊 Example Outputs
|
|
211
|
+
|
|
212
|
+
#### MSA1: Gage Study (Single Reference)
|
|
213
|
+
|
|
214
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/gage_study_single_reference.png)
|
|
215
|
+
|
|
216
|
+
#### MSA2: Gage R&R (Repeatability & Reproducibility)
|
|
217
|
+
|
|
218
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/gage_rnr_layer_thickness.png)
|
|
219
|
+
|
|
220
|
+
#### Process Capability Analysis
|
|
221
|
+
|
|
222
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/cpk-analysis_drop-card.png)
|
|
223
|
+
|
|
224
|
+
#### Root Cause Analysis (ANOVA)
|
|
225
|
+
|
|
226
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/anova_dissolution_residues.png)
|
|
227
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/anova_dissolution_params.png)
|
|
228
|
+
|
|
229
|
+
**formula:**
|
|
230
|
+
|
|
231
|
+
dissolution ~ 26.8292 + 2.3750*employee[T.B] + 0.8375*employee[T.C] - 10.7500*brand[T.ZapPain] - 9.5167*water[T.tap] + 5.7167*brand[T.ZapPain]:water[T.tap]
|
|
232
|
+
|
|
233
|
+
**Model Summary:**
|
|
234
|
+
|
|
235
|
+
| | hierarchical | least_parameter | p_least | s | aic | r2 | r2_adj | r2_pred |
|
|
236
|
+
| --- | ------------ | --------------- | -------- | -------- | ---------- | -------- | -------- | -------- |
|
|
237
|
+
| 0 | True | employee | 0.023298 | 2.374693 | 224.835935 | 0.857379 | 0.840400 | 0.813719 |
|
|
238
|
+
|
|
239
|
+
**Parameter statistics:**
|
|
240
|
+
|
|
241
|
+
| | coef | std err | t | p | ci_low | ci_upp |
|
|
242
|
+
| ----------------------------: | ---------: | -------: | ---------: | -------: | ---------: | --------: |
|
|
243
|
+
| Intercept | 26.829167 | 0.839581 | 31.955433 | 0.000000 | 25.134824 | 28.523509 |
|
|
244
|
+
| employee[T.B] | 2.375000 | 0.839581 | 2.828793 | 0.007133 | 0.680657 | 4.069343 |
|
|
245
|
+
| employee[T.C] | 0.837500 | 0.839581 | 0.997522 | 0.324224 | -0.856843 | 2.531843 |
|
|
246
|
+
| brand[T.ZapPain] | -10.750000 | 0.969464 | -11.088598 | 0.000000 | -12.706458 | -8.793542 |
|
|
247
|
+
| water[T.tap] | -9.516667 | 0.969464 | -9.816417 | 0.000000 | -11.473125 | -7.560208 |
|
|
248
|
+
| brand[T.ZapPain]:water[T.tap] | 5.716667 | 1.371030 | 4.169616 | 0.000149 | 2.949817 | 8.483516 |
|
|
249
|
+
|
|
250
|
+
**Analysis of variance:**
|
|
251
|
+
|
|
252
|
+
| Typ-I | DF | SS | MS | F | p | n2 |
|
|
253
|
+
| ----------- | ---: | ---------: | ---------: | ---------: | -------: | -------: |
|
|
254
|
+
| employee | 2 | 46.431667 | 23.215833 | 4.116891 | 0.023298 | 0.027960 |
|
|
255
|
+
| brand | 1 | 747.340833 | 747.340833 | 132.526821 | 0.000000 | 0.450027 |
|
|
256
|
+
| water | 1 | 532.000833 | 532.000833 | 94.340328 | 0.000000 | 0.320355 |
|
|
257
|
+
| brand:water | 1 | 98.040833 | 98.040833 | 17.385695 | 0.000149 | 0.059037 |
|
|
258
|
+
| Residual | 42 | 236.845000 | 5.639167 | nan | nan | 0.142621 |
|
|
259
|
+
|
|
260
|
+
**Variance inflation factor:**
|
|
261
|
+
|
|
262
|
+
| | DF | VIF | GVIF | Threshold | Collinear | Method |
|
|
263
|
+
| ----------- | ---: | -------: | -------: | --------: | --------: | ------------------: |
|
|
264
|
+
| Intercept | 1 | 5.000000 | 2.236068 | 2.236068 | True | R_squared |
|
|
265
|
+
| employee | 2 | 1.000000 | 1.000000 | 1.495349 | False | generalized |
|
|
266
|
+
| brand | 1 | 1.000000 | 1.000000 | 2.236068 | False | R_squared |
|
|
267
|
+
| water | 1 | 1.000000 | 1.000000 | 2.236068 | False | R_squared |
|
|
268
|
+
| brand:water | 1 | 1.000000 | 1.000000 | 2.236068 | False | single_order-2_term |
|
|
269
|
+
|
|
270
|
+
#### SPC: Control Chart with Mean, UCL/LCL, Specification Limits
|
|
271
|
+
|
|
272
|
+
[](https://raw.githubusercontent.com/j4ggr/DaSPi/main/docs/img/spc_chart_layer_thickness.png)
|
|
273
|
+
|
|
274
|
+
## 🚀 Installation
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
pip install daspi
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## 📚 Documentation
|
|
281
|
+
|
|
282
|
+
- **[User Guide](https://j4ggr.github.io/DaSPi/guides/)** — Complete tutorials for each workflow
|
|
283
|
+
- **[API Reference](https://j4ggr.github.io/DaSPi/anova/)** — Detailed documentation
|
|
284
|
+
- **[3S Methodology](https://j4ggr.github.io/DaSPi/guides/3s-methodology/)** — Structured problem-solving
|
|
285
|
+
|
|
286
|
+
## 🔧 Technical Features
|
|
287
|
+
|
|
288
|
+
- **Centralized configuration** — Manage language, username, and styles globally
|
|
289
|
+
- **Multivariate visualization** — Explore complex relationships
|
|
290
|
+
- **Linear models & ANOVA** — Statistical inference made simple
|
|
291
|
+
- **Hypothesis testing** — Confidence intervals and p-values
|
|
292
|
+
- **Monte Carlo simulation** — Assess uncertainty
|
|
293
|
+
- **Process capability** — Cp, Cpk, Pp, Ppk calculations
|
|
294
|
+
|
|
295
|
+
## ⚙️ Built on Proven Libraries
|
|
296
|
+
|
|
297
|
+
DaSPi leverages the Python scientific stack:
|
|
298
|
+
|
|
299
|
+
- **pandas** — Data manipulation
|
|
300
|
+
- **numpy** — Numerical computing
|
|
301
|
+
- **matplotlib** — Visualization
|
|
302
|
+
- **scipy** — Statistical functions
|
|
303
|
+
- **statsmodels** — Advanced statistics
|
|
304
|
+
|
|
305
|
+
## 👤 About
|
|
306
|
+
|
|
307
|
+
DaSPi is created and maintained by **Reto Jäggli**, Data Scientist at Festo Microtechnology AG.
|
|
308
|
+
|
|
309
|
+
The project is driven by a passion to make **process analytics and Six Sigma workflows more accessible in Python**.
|
|
310
|
+
|
|
311
|
+
## ⚠️ Disclaimer
|
|
312
|
+
|
|
313
|
+
DaSPi is under active development and may contain bugs.
|
|
314
|
+
Results should be validated with trusted statistical tools when required.
|
|
315
|
+
|
|
316
|
+
## 🤝 Feedback & Contributions
|
|
317
|
+
|
|
318
|
+
**If you use DaSPi in real-world process analysis:**
|
|
319
|
+
👉 I would love to hear your use case.
|
|
320
|
+
|
|
321
|
+
Feedback, ideas, and contributions are very welcome.
|
|
322
|
+
|
|
323
|
+
---
|