AutoStatLib 0.4.5__tar.gz → 0.4.7__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.
Files changed (24) hide show
  1. {autostatlib-0.4.5/src/AutoStatLib.egg-info → autostatlib-0.4.7}/PKG-INFO +2 -2
  2. {autostatlib-0.4.5 → autostatlib-0.4.7}/README.md +1 -1
  3. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/StatPlots.py +3 -2
  4. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/_version.py +1 -1
  5. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/helpers.py +3 -0
  6. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/normality_tests.py +26 -18
  7. {autostatlib-0.4.5 → autostatlib-0.4.7/src/AutoStatLib.egg-info}/PKG-INFO +2 -2
  8. {autostatlib-0.4.5 → autostatlib-0.4.7}/LICENSE +0 -0
  9. {autostatlib-0.4.5 → autostatlib-0.4.7}/MANIFEST.in +0 -0
  10. {autostatlib-0.4.5 → autostatlib-0.4.7}/pyproject.toml +0 -0
  11. {autostatlib-0.4.5 → autostatlib-0.4.7}/requirements.txt +0 -0
  12. {autostatlib-0.4.5 → autostatlib-0.4.7}/setup.cfg +0 -0
  13. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/AutoStatLib.py +0 -0
  14. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/__init__.py +0 -0
  15. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/__main__.py +0 -0
  16. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/_protocol.py +0 -0
  17. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/statistical_tests.py +0 -0
  18. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib/text_formatting.py +0 -0
  19. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib.egg-info/SOURCES.txt +0 -0
  20. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib.egg-info/dependency_links.txt +0 -0
  21. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib.egg-info/requires.txt +0 -0
  22. {autostatlib-0.4.5 → autostatlib-0.4.7}/src/AutoStatLib.egg-info/top_level.txt +0 -0
  23. {autostatlib-0.4.5 → autostatlib-0.4.7}/tests/test_autostatlib.py +0 -0
  24. {autostatlib-0.4.5 → autostatlib-0.4.7}/tests/test_statplots.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AutoStatLib
3
- Version: 0.4.5
3
+ Version: 0.4.7
4
4
  Summary: AutoStatLib - a simple statistical analysis tool
5
5
  Author: Stemonitis, SciWare LLC
6
6
  Author-email: konung-yaropolk <yaropolk1995@gmail.com>
@@ -38,7 +38,7 @@ Dynamic: license-file
38
38
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/konung-yaropolk/AutoStatLib/tests.yml?label=Tests)](https://github.com/konung-yaropolk/AutoStatLib/actions/workflows/tests.yml)
39
39
  [![pypi_version](https://img.shields.io/pypi/v/AutoStatLib?label=PyPI&color=green)](https://pypi.org/project/AutoStatLib)
40
40
  [![GitHub Release](https://img.shields.io/github/v/release/konung-yaropolk/AutoStatLib?label=GitHub&color=green&link=https%3A%2F%2Fgithub.com%2Fkonung-yaropolk%2FAutoStatLib)](https://github.com/konung-yaropolk/AutoStatLib)
41
- [![PyPI - License](https://img.shields.io/pypi/l/AutoStatLib)](https://pypi.org/project/AutoStatLib)
41
+ [![PyPI - License](https://img.shields.io/pypi/l/AutoStatLib?color=green)](https://pypi.org/project/AutoStatLib)
42
42
  [![Python](https://img.shields.io/badge/Python-v3.10%5E-green?logo=python)](https://pypi.org/project/AutoStatLib)
43
43
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/AutoStatLib?label=PyPI%20stats&color=blue)](https://pypi.org/project/AutoStatLib)
44
44
 
@@ -3,7 +3,7 @@
3
3
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/konung-yaropolk/AutoStatLib/tests.yml?label=Tests)](https://github.com/konung-yaropolk/AutoStatLib/actions/workflows/tests.yml)
4
4
  [![pypi_version](https://img.shields.io/pypi/v/AutoStatLib?label=PyPI&color=green)](https://pypi.org/project/AutoStatLib)
5
5
  [![GitHub Release](https://img.shields.io/github/v/release/konung-yaropolk/AutoStatLib?label=GitHub&color=green&link=https%3A%2F%2Fgithub.com%2Fkonung-yaropolk%2FAutoStatLib)](https://github.com/konung-yaropolk/AutoStatLib)
6
- [![PyPI - License](https://img.shields.io/pypi/l/AutoStatLib)](https://pypi.org/project/AutoStatLib)
6
+ [![PyPI - License](https://img.shields.io/pypi/l/AutoStatLib?color=green)](https://pypi.org/project/AutoStatLib)
7
7
  [![Python](https://img.shields.io/badge/Python-v3.10%5E-green?logo=python)](https://pypi.org/project/AutoStatLib)
8
8
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/AutoStatLib?label=PyPI%20stats&color=blue)](https://pypi.org/project/AutoStatLib)
9
9
 
@@ -107,11 +107,12 @@ class BaseStatPlot(Helpers):
107
107
  data_groups: list[list[float]],
108
108
  p_value_exact: Optional[float] = None,
109
109
  Test_Name: str = "",
110
- Paired_Test_Applied: bool = False,
111
110
  plot_title: str = "",
112
111
  x_label: str = "",
113
112
  y_label: str = "",
114
113
  print_x_labels: bool = True,
114
+ Paired_Test_Applied: bool = False,
115
+ Paired_Samples: bool = False,
115
116
  Groups_Name: Optional[list[str]] = None,
116
117
  subgrouping: Optional[list] = None,
117
118
  Posthoc_Matrix: Optional[list[list[float]]] = None,
@@ -140,7 +141,7 @@ class BaseStatPlot(Helpers):
140
141
  Posthoc_Matrix if Posthoc_Matrix is not None else []
141
142
  )
142
143
  self.n_significance_bars: int = 1
143
- self.dependent: bool = Paired_Test_Applied
144
+ self.dependent: bool = Paired_Test_Applied or Paired_Samples
144
145
  self.plot_title: str = plot_title
145
146
  self.x_label: str = x_label
146
147
  self.y_label: str = y_label
@@ -1,2 +1,2 @@
1
1
  # AutoStatLib package version:
2
- __version__ = "0.4.5"
2
+ __version__ = "0.4.7"
@@ -112,6 +112,9 @@ class Helpers(StatAnalysisProtocol):
112
112
  "Paired_Test_Applied": (
113
113
  self.paired_test_applied if self.successfull else None
114
114
  ),
115
+ "Paired_Samples": (
116
+ self.paired
117
+ ),
115
118
  "Tails": self.tails,
116
119
  "p_value_exact": self.p_value.item() if self.successfull else None,
117
120
  "Stars": self.stars_int,
@@ -205,22 +205,30 @@ class NormalityTests(StatAnalysisProtocol):
205
205
  )
206
206
  result = anderson(data, dist="norm", method=mc_method)
207
207
  return float(result.statistic), float(result.pvalue)
208
+
209
+ if method == "interpolate":
210
+ result = anderson(data, dist="norm", method="interpolate")
211
+ return float(result.statistic), float(result.pvalue)
208
212
 
209
- n: int = len(data)
210
- ad: float = float(anderson(data, dist="norm", method="interpolate").statistic)
211
-
212
- # Adjust statistic for small sample sizes, then map to a
213
- # continuous p-value (Jantschi & Bolboaca, 2018).
214
- s: float = ad * (1 + 0.75 / n + 2.25 / (n**2))
215
-
216
- p: float
217
- if s >= 0.6:
218
- p = np.e ** (1.2937 - 5.709 * s + 0.0186 * s**2)
219
- elif s > 0.34:
220
- p = np.e ** (0.9177 - 4.279 * s - 1.38 * s**2)
221
- elif s > 0.2:
222
- p = 1 - np.e ** (-8.318 + 42.796 * s - 59.938 * s**2)
223
- else:
224
- p = 1 - np.e ** (-13.436 + 101.14 * s - 223.73 * s**2)
225
-
226
- return ad, p
213
+ # n: int = len(data)
214
+ # ad: float = float(anderson(data, dist="norm", method="interpolate").statistic)
215
+
216
+ # # Adjust statistic for small sample sizes, then map to a
217
+ # # continuous p-value (Jantschi & Bolboaca, 2018).
218
+ # s: float = ad * (1 + 0.75 / n + 2.25 / (n**2))
219
+
220
+ # try:
221
+ # p: float
222
+ # if s >= 0.6:
223
+ # p = np.e ** (1.2937 - 5.709 * s + 0.0186 * s**2)
224
+ # elif s > 0.34:
225
+ # p = np.e ** (0.9177 - 4.279 * s - 1.38 * s**2)
226
+ # elif s > 0.2:
227
+ # p = 1 - np.e ** (-8.318 + 42.796 * s - 59.938 * s**2)
228
+ # else:
229
+ # p = 1 - np.e ** (-13.436 + 101.14 * s - 223.73 * s**2)
230
+ # # catch rear case of overflow when p is too small
231
+ # except Exception(OverflowError):
232
+ # p = 5e-324
233
+
234
+ # return ad, p
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AutoStatLib
3
- Version: 0.4.5
3
+ Version: 0.4.7
4
4
  Summary: AutoStatLib - a simple statistical analysis tool
5
5
  Author: Stemonitis, SciWare LLC
6
6
  Author-email: konung-yaropolk <yaropolk1995@gmail.com>
@@ -38,7 +38,7 @@ Dynamic: license-file
38
38
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/konung-yaropolk/AutoStatLib/tests.yml?label=Tests)](https://github.com/konung-yaropolk/AutoStatLib/actions/workflows/tests.yml)
39
39
  [![pypi_version](https://img.shields.io/pypi/v/AutoStatLib?label=PyPI&color=green)](https://pypi.org/project/AutoStatLib)
40
40
  [![GitHub Release](https://img.shields.io/github/v/release/konung-yaropolk/AutoStatLib?label=GitHub&color=green&link=https%3A%2F%2Fgithub.com%2Fkonung-yaropolk%2FAutoStatLib)](https://github.com/konung-yaropolk/AutoStatLib)
41
- [![PyPI - License](https://img.shields.io/pypi/l/AutoStatLib)](https://pypi.org/project/AutoStatLib)
41
+ [![PyPI - License](https://img.shields.io/pypi/l/AutoStatLib?color=green)](https://pypi.org/project/AutoStatLib)
42
42
  [![Python](https://img.shields.io/badge/Python-v3.10%5E-green?logo=python)](https://pypi.org/project/AutoStatLib)
43
43
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/AutoStatLib?label=PyPI%20stats&color=blue)](https://pypi.org/project/AutoStatLib)
44
44
 
File without changes
File without changes
File without changes
File without changes