Statys
Statys provides descriptive measures, pairwise non-parametric tests, Friedman and Iman-Davenport statistics, Nemenyi critical differences, and comparison plots.
Statys requires Python 3.11 or newer.
Installation
pip install statys
Repeated comparisons
import numpy as np
from statys import friedman, nemenyi, plot_critical_difference
scores = np.array(
[
[0.82, 0.79, 0.75],
[0.80, 0.77, 0.78],
[0.84, 0.81, 0.76],
[0.79, 0.75, 0.74],
]
)
print(friedman(scores))
ranks, critical_difference = nemenyi(scores)
plot_critical_difference(
ranks,
critical_difference,
labels=["Model A", "Model B", "Model C"],
output="critical-difference.pdf",
)
Rows are experimental blocks and columns are the treatments being compared.
Measures and pairwise tests
from statys import measures, pairwise, significance
control = [0.82, 0.80, 0.84, 0.79]
model_a = [0.79, 0.77, 0.81, 0.75]
model_b = [0.75, 0.78, 0.76, 0.74]
print(measures.mean(control, model_a, model_b))
results = pairwise.signed_rank(control, model_a, model_b)
significance.plot_p_value(
results,
labels=["Control", "Model A", "Model B"],
output="p-values.pdf",
)
The measures module also provides kurtosis, max, median, min, rank,
skewness, std, and var. The pairwise module provides u_test,
signed_rank, and rank_sum.
Development
uv sync
uv run pytest
uv run pre-commit run --all-files
uv build
Documentation is available at statys.readthedocs.io.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file statys-2.0.1.tar.gz.
File metadata
- Download URL: statys-2.0.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e01d1696bdf735fdcd61cddaa67745575f7ebc47201e2ea2ef23f2329a94421f
|
|
| MD5 |
a69d5e4b170cd0c35ce12d6868e29abc
|
|
| BLAKE2b-256 |
b42648aeb03cd467ba9273550db1090fc8a1f998d592ba4760d7506bb3c9bcda
|
File details
Details for the file statys-2.0.1-py3-none-any.whl.
File metadata
- Download URL: statys-2.0.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f7354ad1e57121908bbc5783ee8e95e7bf107b7ff4cced2f3c8c5972e84722
|
|
| MD5 |
cb36ac79437d6e33d4bab9797496e12d
|
|
| BLAKE2b-256 |
1192879e40d7000c3b25846b4001635e0043bc956ced32cb18439b4ca1f5f47d
|