DaSPi 2.4.1__tar.gz → 2.6.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.4.1 → daspi-2.6.0}/PKG-INFO +1 -1
- {daspi-2.4.1 → daspi-2.6.0}/daspi/__init__.py +12 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/anova/model.py +127 -13
- {daspi-2.4.1 → daspi-2.6.0}/daspi/constants.py +60 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/chart.py +11 -3
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/plotter.py +552 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/precast.py +249 -1
- {daspi-2.4.1 → daspi-2.6.0}/daspi/strings.py +50 -0
- {daspi-2.4.1 → daspi-2.6.0}/pyproject.toml +1 -1
- {daspi-2.4.1 → daspi-2.6.0}/tests/anova_model_test.py +14 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_alignments_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_all_alignments.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_angles_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_callable_formatters.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_combined_all_features.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_extreme_angles.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_formatters_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_formatters_scientific.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_multivariate_formatting.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_orientation_mapping.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Formatting_Features_Test_percentage_formatter.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_comparison_with_violin.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_custom_color.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_custom_width.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_joint_chart_mixed_plots.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_multivariate_chart_facets.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_resolution_high.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_horizontal.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_no_fade.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_no_fill.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/GaussianKDEContourUnivariate_single_chart_with_hue.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_bar_stacking.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_pareto_marked.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_probability_dists-prob.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_regression_kde.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/MultivariateChart_full-stripes.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/MultivariateChart_full.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_bivariate-univariate-charts_contour-mean-test.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_bivariate-univariate-charts_mean-test.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_bivariate-univariate-charts_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_bivariate-univariate-charts_smoothed.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_bivariate-univariate-charts_user.png +0 -0
- daspi-2.6.0/tests/charts/Precasts_goodness_of_fit_charts_basic.png +0 -0
- daspi-2.6.0/tests/charts/Precasts_goodness_of_fit_charts_refit-epoch-7.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_pair_comparison_charts_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_parameter_relevance_charts_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_process-capabity-analysis-charts_hue.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_residual_charts_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_KDE-cumulative_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_KDE_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_KDE_ridge.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_beeswarm_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_beeswarm_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_blandaltman_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_blandaltman_user.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_box_fill.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_box_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_box_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_categorical-float-features_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_errorbar_mean-test.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_errorbar_sem.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_errorbar_std-test.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_errorbar_var-test.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_fitted-density_cdf-multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_jitter_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_jitter_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_line_hue.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_line_hue_size.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_pareto-threshold_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_pareto_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_pareto_transposed.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_quantiles_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_quantiles_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_full.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_hue-shape.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_hue-size.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_hue.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_shape.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_size-shape.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_size.png +0 -0
- daspi-2.6.0/tests/charts/SingleChart_smoothing_ma-ema.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violin_mono.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violin_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violin_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_plotter_test.py +301 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_visual_test.py +88 -0
- daspi-2.4.1/tests/charts/_debug_kde_bottom_crop.png +0 -0
- daspi-2.4.1/tests/charts/_debug_violin_bottom_crop.png +0 -0
- daspi-2.4.1/tests/charts/_debug_violin_top_crop.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/LICENSE +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/README.md +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/_typing.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/_version.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/anova/__init__.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/anova/convert.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/anova/tables.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/config.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/__init__.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/ancova.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/anova.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/anova2.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/anova2_unbalanced.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/anova3.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/anova3_unbalanced.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/carpet_full-factorial.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/covariate.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/drop_card.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/eeprom_full-factorial.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/eeprom_partial-factorial.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/grnr_adjustment.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/grnr_layer_thickness.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/grnr_spc.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/iris.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/mpg.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/painkillers-dissolution.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/partial_factorial.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/penguins.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/process_capability.mpx +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/salt_sticks.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/shoe-sole.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/datasets/tips.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/doe/__init__.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/doe/build.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/__init__.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/appearance.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/classify.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/facets.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/styles/daspi-dark.mplstyle +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/styles/daspi.mplstyle +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/styles/ggplot2.mplstyle +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/plotlib/styles/seaborn.mplstyle +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/requirements.txt +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/statistics/__init__.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/statistics/confidence.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/statistics/estimation.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/statistics/hypothesis.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/daspi/statistics/montecarlo.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/ANOVA_SS_Fehler.mpx +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/ANOVA_SS_Fehler.mpx.bak +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/GageRnR.mpx +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/GageRnR.mpx.bak +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/__init__.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/anova_convert_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/anova_tables_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_kdes_kde-mean.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_kdes_mixed-kde.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/JointChart_probability_norm-prob.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_gage_rnr_model_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/Precasts_gage_study_model_basic.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_KDE-cumulative_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_KDE_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_fitted-density_pdf-data.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_fitted-density_pdf-norm.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_simple-stripes-65ci.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_simple-stripes-99ci.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_simple-stripes.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_scatter_transposed.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violine-contour_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violine_mono.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violine_multiple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/charts/SingleChart_violine_simple.png +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/config_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/anova3_result.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/dists_10-samples.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/dists_25-samples.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/gage_rnr.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/gage_study.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/generate_dists.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/grnr_d-optimal.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/data/uncertainties.csv +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/doe_build_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_appearance_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_chart_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_classify_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_facets_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/plotlib_templates_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/r2_pred.mpx +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/r2_pred.mpx.bak +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/statistics_confidence_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/statistics_estimation_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/statistics_hypothesis_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/statistics_montecarlo_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/strings_test.py +0 -0
- {daspi-2.4.1 → daspi-2.6.0}/tests/test_full_factorial_design_builder.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: DaSPi
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
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
5
|
Author-Email: Reto Jäggli <reto@jaeggli.email>
|
|
6
6
|
License: MIT
|
|
@@ -80,6 +80,7 @@ if TYPE_CHECKING:
|
|
|
80
80
|
ConfidenceInterval,
|
|
81
81
|
DensityCurve,
|
|
82
82
|
ErrorBar,
|
|
83
|
+
ExponentialSmoothingLine,
|
|
83
84
|
FittedDensity,
|
|
84
85
|
GaussianKDE,
|
|
85
86
|
GaussianKDEContour,
|
|
@@ -90,6 +91,7 @@ if TYPE_CHECKING:
|
|
|
90
91
|
LinearRegressionLine,
|
|
91
92
|
LoessLine,
|
|
92
93
|
MeanTest,
|
|
94
|
+
MovingAverageLine,
|
|
93
95
|
ParallelCoordinate,
|
|
94
96
|
Pareto,
|
|
95
97
|
Plotter,
|
|
@@ -101,6 +103,7 @@ if TYPE_CHECKING:
|
|
|
101
103
|
SpreadWidth,
|
|
102
104
|
StandardErrorMean,
|
|
103
105
|
Stem,
|
|
106
|
+
StripeArea,
|
|
104
107
|
StripeLine,
|
|
105
108
|
StripeSpan,
|
|
106
109
|
TransformPlotter,
|
|
@@ -111,6 +114,7 @@ if TYPE_CHECKING:
|
|
|
111
114
|
BivariateUnivariateCharts,
|
|
112
115
|
GageRnRCharts,
|
|
113
116
|
GageStudyCharts,
|
|
117
|
+
GoodnessOfFitCharts,
|
|
114
118
|
PairComparisonCharts,
|
|
115
119
|
PairwiseMatrixCharts,
|
|
116
120
|
ParameterRelevanceCharts,
|
|
@@ -238,6 +242,7 @@ _LAZY_SUBMODULES: dict[str, str] = {
|
|
|
238
242
|
'ConfidenceInterval': '.plotlib.plotter',
|
|
239
243
|
'DensityCurve': '.plotlib.plotter',
|
|
240
244
|
'ErrorBar': '.plotlib.plotter',
|
|
245
|
+
'ExponentialSmoothingLine': '.plotlib.plotter',
|
|
241
246
|
'FittedDensity': '.plotlib.plotter',
|
|
242
247
|
'GaussianKDE': '.plotlib.plotter',
|
|
243
248
|
'GaussianKDEContour': '.plotlib.plotter',
|
|
@@ -248,6 +253,7 @@ _LAZY_SUBMODULES: dict[str, str] = {
|
|
|
248
253
|
'LinearRegressionLine': '.plotlib.plotter',
|
|
249
254
|
'LoessLine': '.plotlib.plotter',
|
|
250
255
|
'MeanTest': '.plotlib.plotter',
|
|
256
|
+
'MovingAverageLine': '.plotlib.plotter',
|
|
251
257
|
'ParallelCoordinate': '.plotlib.plotter',
|
|
252
258
|
'Pareto': '.plotlib.plotter',
|
|
253
259
|
'Plotter': '.plotlib.plotter',
|
|
@@ -259,6 +265,7 @@ _LAZY_SUBMODULES: dict[str, str] = {
|
|
|
259
265
|
'SpreadWidth': '.plotlib.plotter',
|
|
260
266
|
'StandardErrorMean': '.plotlib.plotter',
|
|
261
267
|
'Stem': '.plotlib.plotter',
|
|
268
|
+
'StripeArea': '.plotlib.plotter',
|
|
262
269
|
'StripeLine': '.plotlib.plotter',
|
|
263
270
|
'StripeSpan': '.plotlib.plotter',
|
|
264
271
|
'TransformPlotter': '.plotlib.plotter',
|
|
@@ -267,6 +274,7 @@ _LAZY_SUBMODULES: dict[str, str] = {
|
|
|
267
274
|
'BivariateUnivariateCharts': '.plotlib.precast',
|
|
268
275
|
'GageRnRCharts': '.plotlib.precast',
|
|
269
276
|
'GageStudyCharts': '.plotlib.precast',
|
|
277
|
+
'GoodnessOfFitCharts': '.plotlib.precast',
|
|
270
278
|
'PairComparisonCharts': '.plotlib.precast',
|
|
271
279
|
'PairwiseMatrixCharts': '.plotlib.precast',
|
|
272
280
|
'ParameterRelevanceCharts': '.plotlib.precast',
|
|
@@ -372,6 +380,7 @@ __all__ = [
|
|
|
372
380
|
'DistributionEstimator',
|
|
373
381
|
'Dodger',
|
|
374
382
|
'ErrorBar',
|
|
383
|
+
'ExponentialSmoothingLine',
|
|
375
384
|
'Factor',
|
|
376
385
|
'FittedDensity',
|
|
377
386
|
'FractionalFactorialDesignBuilder',
|
|
@@ -400,7 +409,9 @@ __all__ = [
|
|
|
400
409
|
'Lowess',
|
|
401
410
|
'MeanTest',
|
|
402
411
|
'MeasurementUncertainty',
|
|
412
|
+
'MovingAverageLine',
|
|
403
413
|
'MultivariateChart',
|
|
414
|
+
'GoodnessOfFitCharts',
|
|
404
415
|
'PairComparisonCharts',
|
|
405
416
|
'PairwiseMatrixCharts',
|
|
406
417
|
'ParallelCoordinate',
|
|
@@ -424,6 +435,7 @@ __all__ = [
|
|
|
424
435
|
'SpreadWidth',
|
|
425
436
|
'StandardErrorMean',
|
|
426
437
|
'Stem',
|
|
438
|
+
'StripeArea',
|
|
427
439
|
'StripeLine',
|
|
428
440
|
'StripeSpan',
|
|
429
441
|
'StripesFacets',
|
|
@@ -374,15 +374,15 @@ class LinearModel(BaseHTMLReprModel):
|
|
|
374
374
|
target='dissolution',
|
|
375
375
|
factors=['employee', 'stirrer', 'brand', 'catalyst', 'water'],
|
|
376
376
|
covariates=['temperature', 'preparation'],
|
|
377
|
-
order=2,
|
|
378
|
-
covariates=None)
|
|
377
|
+
order=2,)
|
|
379
378
|
|
|
380
|
-
# Store goodnes of fit values for each elimination step
|
|
379
|
+
# Store and visualize goodnes of fit values for each elimination step
|
|
381
380
|
df_gof = pd.concat(model.recursive_elimination())
|
|
381
|
+
dsp.GoodnessOfFitCharts(df_gof, model).plot().stripes().label(info=True)
|
|
382
382
|
|
|
383
383
|
# Plot residual and parameter relevance analysis
|
|
384
384
|
dsp.ResidualsCharts(model).plot().stripes().label(info=True)
|
|
385
|
-
dsp.ParameterRelevanceCharts(model).plot().label(info=True)
|
|
385
|
+
dsp.ParameterRelevanceCharts(model).plot().stripes().label(info=True)
|
|
386
386
|
|
|
387
387
|
# Get HTML output
|
|
388
388
|
model
|
|
@@ -883,7 +883,11 @@ class LinearModel(BaseHTMLReprModel):
|
|
|
883
883
|
DataFrame
|
|
884
884
|
The goodness-of-fit metrics table as DataFrame containing
|
|
885
885
|
the following columns:
|
|
886
|
-
- '
|
|
886
|
+
- 'epoch' = the given `index`, i.e. the step at which a term
|
|
887
|
+
was added or removed during recursive elimination
|
|
888
|
+
- 'formula' = current formula, can be used to refit the
|
|
889
|
+
model at this step, see `formula_at_epoch` and
|
|
890
|
+
`refit_at_epoch`
|
|
887
891
|
- 's' = Uncertainty of the model as square root of MS_Residual
|
|
888
892
|
- 'aic' = Akaike's information criteria
|
|
889
893
|
- 'r2' = R-squared of the model
|
|
@@ -895,17 +899,127 @@ class LinearModel(BaseHTMLReprModel):
|
|
|
895
899
|
"""
|
|
896
900
|
self.anova(typ='III', vif=False)
|
|
897
901
|
data = {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
+
ANOVA.EPOCH: index + 1 if isinstance(index, int) else index,
|
|
903
|
+
ANOVA.FORMULA: self.formula,
|
|
904
|
+
ANOVA.HIERARCHICAL: self.is_hierarchical(),
|
|
905
|
+
ANOVA.LEAST_PARAMETER: self.least_parameter(),
|
|
906
|
+
ANOVA.P_LEAST: self.p_values().max(),
|
|
902
907
|
's': self.uncertainty,
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
908
|
+
ANOVA.AIC: self.model.aic,
|
|
909
|
+
ANOVA.R2: self.model.rsquared,
|
|
910
|
+
ANOVA.R2_ADJ: self.model.rsquared_adj,
|
|
911
|
+
ANOVA.R2_PRED: self.r2_pred()}
|
|
907
912
|
return pd.DataFrame(data, index=[index])
|
|
908
913
|
|
|
914
|
+
@staticmethod
|
|
915
|
+
def formula_at_epoch(df_gof: DataFrame, epoch: int) -> str:
|
|
916
|
+
"""Extract the model formula recorded at a given elimination
|
|
917
|
+
step from a goodness-of-fit table.
|
|
918
|
+
|
|
919
|
+
Parameters
|
|
920
|
+
----------
|
|
921
|
+
df_gof : DataFrame
|
|
922
|
+
The goodness-of-fit table collected during recursive
|
|
923
|
+
elimination, i.e. the concatenated result of
|
|
924
|
+
`recursive_elimination`. Must contain the columns 'epoch'
|
|
925
|
+
and 'formula', see `gof_metrics`.
|
|
926
|
+
epoch : int
|
|
927
|
+
The elimination step whose formula should be extracted.
|
|
928
|
+
|
|
929
|
+
Returns
|
|
930
|
+
-------
|
|
931
|
+
str
|
|
932
|
+
The model formula used at the given `epoch`.
|
|
933
|
+
|
|
934
|
+
Examples
|
|
935
|
+
--------
|
|
936
|
+
```python
|
|
937
|
+
import pandas as pd
|
|
938
|
+
import daspi as dsp
|
|
939
|
+
|
|
940
|
+
df = dsp.load_dataset('painkillers-dissolution')
|
|
941
|
+
lm = dsp.LinearModel(
|
|
942
|
+
source=df,
|
|
943
|
+
target='dissolution',
|
|
944
|
+
factors=['employee', 'stirrer', 'brand', 'catalyst', 'water'],
|
|
945
|
+
covariates=['temperature', 'preparation'],
|
|
946
|
+
order=2)
|
|
947
|
+
df_gof = pd.concat(lm.recursive_elimination())
|
|
948
|
+
dsp.LinearModel.formula_at_epoch(df_gof, epoch=5)
|
|
949
|
+
```
|
|
950
|
+
"""
|
|
951
|
+
rows = df_gof[df_gof[ANOVA.EPOCH] == epoch]
|
|
952
|
+
assert not rows.empty, (
|
|
953
|
+
f'No entry found for epoch={epoch} in df_gof, got epochs '
|
|
954
|
+
f'{sorted(df_gof[ANOVA.EPOCH].unique())}')
|
|
955
|
+
return str(rows[ANOVA.FORMULA].iloc[0])
|
|
956
|
+
|
|
957
|
+
def refit_at_epoch(self, df_gof: DataFrame, epoch: int, **kwds) -> Self:
|
|
958
|
+
"""Refit this model using the formula recorded at a given
|
|
959
|
+
elimination step of a goodness-of-fit table.
|
|
960
|
+
|
|
961
|
+
This is a convenience method combining `formula_at_epoch` and
|
|
962
|
+
`fit`, allowing you to go back to any intermediate step of a
|
|
963
|
+
previously run `recursive_elimination` once you have picked a
|
|
964
|
+
preferred epoch, e.g. by inspecting a
|
|
965
|
+
`daspi.GoodnessOfFitCharts` plot.
|
|
966
|
+
|
|
967
|
+
Parameters
|
|
968
|
+
----------
|
|
969
|
+
df_gof : DataFrame
|
|
970
|
+
The goodness-of-fit table collected during recursive
|
|
971
|
+
elimination, i.e. the concatenated result of
|
|
972
|
+
`recursive_elimination`. Must contain the columns 'epoch'
|
|
973
|
+
and 'formula', see `gof_metrics`.
|
|
974
|
+
epoch : int
|
|
975
|
+
The elimination step whose formula should be used to refit
|
|
976
|
+
the model.
|
|
977
|
+
**kwds
|
|
978
|
+
Additional keyword arguments for `ols` function of
|
|
979
|
+
`statsmodels.formula.api`, passed to `fit`.
|
|
980
|
+
|
|
981
|
+
Returns
|
|
982
|
+
-------
|
|
983
|
+
Self
|
|
984
|
+
The current instance of the model, refitted with the
|
|
985
|
+
formula of the given `epoch`, for method chaining.
|
|
986
|
+
|
|
987
|
+
Notes
|
|
988
|
+
-----
|
|
989
|
+
This also resyncs the `excluded` attribute so that the
|
|
990
|
+
`formula` property and methods relying on it (`eliminate`,
|
|
991
|
+
`include`, `recursive_elimination`) stay consistent with the
|
|
992
|
+
formula used for refitting.
|
|
993
|
+
|
|
994
|
+
Examples
|
|
995
|
+
--------
|
|
996
|
+
```python
|
|
997
|
+
import pandas as pd
|
|
998
|
+
import daspi as dsp
|
|
999
|
+
|
|
1000
|
+
df = dsp.load_dataset('painkillers-dissolution')
|
|
1001
|
+
lm = dsp.LinearModel(
|
|
1002
|
+
source=df,
|
|
1003
|
+
target='dissolution',
|
|
1004
|
+
factors=['employee', 'stirrer', 'brand', 'catalyst', 'water'],
|
|
1005
|
+
covariates=['temperature', 'preparation'],
|
|
1006
|
+
order=2)
|
|
1007
|
+
df_gof = pd.concat(lm.recursive_elimination())
|
|
1008
|
+
lm.refit_at_epoch(df_gof, epoch=5)
|
|
1009
|
+
dsp.ParameterRelevanceCharts(lm).plot().stripes().label()
|
|
1010
|
+
```
|
|
1011
|
+
"""
|
|
1012
|
+
formula = self.formula_at_epoch(df_gof, epoch)
|
|
1013
|
+
terms = [t.strip() for t in formula.split('~', 1)[1].split('+')]
|
|
1014
|
+
drop_intercept = '-1' in terms
|
|
1015
|
+
terms = [t for t in terms if t != '-1']
|
|
1016
|
+
self.excluded = {t for t in self._initial_terms if t not in terms}
|
|
1017
|
+
if drop_intercept:
|
|
1018
|
+
self.excluded.add(ANOVA.INTERCEPT)
|
|
1019
|
+
else:
|
|
1020
|
+
self.excluded.discard(ANOVA.INTERCEPT)
|
|
1021
|
+
return self.fit(**kwds)
|
|
1022
|
+
|
|
909
1023
|
def summary(
|
|
910
1024
|
self,
|
|
911
1025
|
anova_typ: Literal['', 'I', 'II', 'III'] | None = None,
|
|
@@ -203,6 +203,12 @@ class _Kw_:
|
|
|
203
203
|
"""Keyword arguments for confidence interval area for fit."""
|
|
204
204
|
return {'zorder': 2.2, 'alpha': 0.8, 'marker': ''}
|
|
205
205
|
|
|
206
|
+
@property
|
|
207
|
+
def FIT_LINE_HANDLE(self) -> dict[str, Any]:
|
|
208
|
+
"""Keyword arguments for the legend handle of a fitted line
|
|
209
|
+
(e.g. `MovingAverageLine`, `ExponentialSmoothingLine`)."""
|
|
210
|
+
return {'lw': LINE.WIDTH, 'alpha': 0.8}
|
|
211
|
+
|
|
206
212
|
@property
|
|
207
213
|
def FIT_CI(self) -> dict[str, Any]:
|
|
208
214
|
"""Keyword arguments for confidence interval area for fit."""
|
|
@@ -520,6 +526,14 @@ class _Plotter_:
|
|
|
520
526
|
SUBGROUP: Literal['_subgroup_'] = '_subgroup_'
|
|
521
527
|
"""Column name for subgroups used mostly in TransformPlotter."""
|
|
522
528
|
|
|
529
|
+
SMOOTHED_TARGET: Literal['_smoothed_target_'] = '_smoothed_target_'
|
|
530
|
+
"""Column name for smoothed target values (moving average,
|
|
531
|
+
exponential smoothing)."""
|
|
532
|
+
|
|
533
|
+
SMOOTHED_FEATURE: Literal['_smoothed_feature_'] = '_smoothed_feature_'
|
|
534
|
+
"""Column name for the feature values matching the smoothed target
|
|
535
|
+
values (moving average, exponential smoothing)."""
|
|
536
|
+
|
|
523
537
|
@property
|
|
524
538
|
def REGRESSION_CI_NAMES(self) -> tuple[str, str, str, str]:
|
|
525
539
|
"""Get names for regression confidences in order:
|
|
@@ -788,6 +802,13 @@ class _Default_:
|
|
|
788
802
|
- 6 = ±3 σ, capturing about 99.7% of the data.
|
|
789
803
|
"""
|
|
790
804
|
|
|
805
|
+
MA_WINDOW: Literal[5] = 5
|
|
806
|
+
"""Default window size for the `MovingAverageLine` Plotter."""
|
|
807
|
+
|
|
808
|
+
EWM_ALPHA: float = 0.3
|
|
809
|
+
"""Default smoothing factor (alpha) for the
|
|
810
|
+
`ExponentialSmoothingLine` Plotter."""
|
|
811
|
+
|
|
791
812
|
@property
|
|
792
813
|
def MARKER(self) -> str:
|
|
793
814
|
"""Default marker for scatter plots."""
|
|
@@ -843,6 +864,45 @@ class _Anova_:
|
|
|
843
864
|
"""Default column name for the Variance Inflation Factor values used
|
|
844
865
|
to detect multicollinearity in an ANOVA table."""
|
|
845
866
|
|
|
867
|
+
EPOCH: Literal['epoch'] = 'epoch'
|
|
868
|
+
"""Column name for the step at which a term was added or removed
|
|
869
|
+
during recursive elimination in a goodness-of-fit table, see
|
|
870
|
+
`LinearModel.gof_metrics`."""
|
|
871
|
+
|
|
872
|
+
FORMULA: Literal['formula'] = 'formula'
|
|
873
|
+
"""Column name for the model formula at a given elimination step in
|
|
874
|
+
a goodness-of-fit table, see `LinearModel.gof_metrics` and
|
|
875
|
+
`LinearModel.formula_at_epoch`."""
|
|
876
|
+
|
|
877
|
+
HIERARCHICAL: Literal['hierarchical'] = 'hierarchical'
|
|
878
|
+
"""Column name for the flag indicating whether the model is
|
|
879
|
+
hierarchical in a goodness-of-fit table, see
|
|
880
|
+
`LinearModel.gof_metrics`."""
|
|
881
|
+
|
|
882
|
+
LEAST_PARAMETER: Literal['least_parameter'] = 'least_parameter'
|
|
883
|
+
"""Column name for the least significant term in a goodness-of-fit
|
|
884
|
+
table, see `LinearModel.gof_metrics`."""
|
|
885
|
+
|
|
886
|
+
P_LEAST: Literal['p_least'] = 'p_least'
|
|
887
|
+
"""Column name for the p-value of the least significant term in a
|
|
888
|
+
goodness-of-fit table, see `LinearModel.gof_metrics`."""
|
|
889
|
+
|
|
890
|
+
AIC: Literal['aic'] = 'aic'
|
|
891
|
+
"""Column name for Akaike's information criterion in a
|
|
892
|
+
goodness-of-fit table, see `LinearModel.gof_metrics`."""
|
|
893
|
+
|
|
894
|
+
R2: Literal['r2'] = 'r2'
|
|
895
|
+
"""Column name for R-squared in a goodness-of-fit table, see
|
|
896
|
+
`LinearModel.gof_metrics`."""
|
|
897
|
+
|
|
898
|
+
R2_ADJ: Literal['r2_adj'] = 'r2_adj'
|
|
899
|
+
"""Column name for adjusted R-squared in a goodness-of-fit table,
|
|
900
|
+
see `LinearModel.gof_metrics`."""
|
|
901
|
+
|
|
902
|
+
R2_PRED: Literal['r2_pred'] = 'r2_pred'
|
|
903
|
+
"""Column name for predicted R-squared in a goodness-of-fit table,
|
|
904
|
+
see `LinearModel.gof_metrics`."""
|
|
905
|
+
|
|
846
906
|
SMALLEST_INTERACTION_ORDER: int = 2
|
|
847
907
|
"""Smallest possible interaction order, i.e. the interaction between
|
|
848
908
|
two factors (A:B)."""
|
|
@@ -62,6 +62,7 @@ import pandas as pd
|
|
|
62
62
|
from matplotlib.axes import Axes
|
|
63
63
|
from matplotlib.axis import XAxis, YAxis
|
|
64
64
|
from matplotlib.figure import Figure
|
|
65
|
+
from matplotlib.lines import Line2D
|
|
65
66
|
from matplotlib.ticker import AutoMinorLocator, Formatter
|
|
66
67
|
from numpy.typing import NDArray
|
|
67
68
|
from pandas.core.frame import DataFrame
|
|
@@ -740,6 +741,14 @@ class SingleChart(Chart):
|
|
|
740
741
|
handle_label[self.size] = self.sizing.handles_labels()
|
|
741
742
|
if hasattr(self, 'stripes_facets'):
|
|
742
743
|
handle_label[STR['stripes']] = self.stripes_facets.handles_labels()
|
|
744
|
+
smoothers = {
|
|
745
|
+
label: Line2D(
|
|
746
|
+
xdata=[], ydata=[], color=plot.color, **KW.FIT_LINE_HANDLE)
|
|
747
|
+
for plot in self._plots
|
|
748
|
+
if (label := getattr(plot, 'legend_label', None)) is not None}
|
|
749
|
+
if smoothers:
|
|
750
|
+
handle_label[STR['smoothing']] = (
|
|
751
|
+
tuple(smoothers.values()), tuple(smoothers.keys()))
|
|
743
752
|
return handle_label
|
|
744
753
|
|
|
745
754
|
def _check_current_data_(self) -> bool:
|
|
@@ -934,9 +943,8 @@ class SingleChart(Chart):
|
|
|
934
943
|
if not isinstance(combination, tuple):
|
|
935
944
|
combination = (combination, )
|
|
936
945
|
self._last_variate = deepcopy(self._current_variate)
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
946
|
+
self._current_variate |= dict(zip(self.variate_names, combination))
|
|
947
|
+
|
|
940
948
|
def dodge(self) -> None:
|
|
941
949
|
"""Converts the feature data to tick positions, taking dodging
|
|
942
950
|
into account."""
|