Registry / data / scikit-posthocs

scikit-posthocs

JSON →
library0.14.0pypypi✓ verified 84d ago

Statistical post-hoc analysis and outlier detection algorithms for Python. Provides pairwise multiple comparison tests (e.g., Nemenyi, Conover, Dunn, Bonferroni) and outlier detection (e.g., IQR, Grubbs). Current version: 0.12.0. Release cadence is irregular, major updates every 1-2 years.

pip install scikit-posthocs
INSTALL
IMPORT
SIG · SCIKIT-POSTHOCS
S
scikit-posthocs
datapythonv0.14.0
Install
18.3s avg
Import
5681ms
Disk
453MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.14.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 18s
py 3.11
✓ —
✓ 17s
py 3.12
✓ —
✓ 17.4s
py 3.13
✓ —
✓ 18.5s
py 3.9
✕ build_error
✓ 20.7s
453MB installed
● package 453MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

posthoc_nemenyi_friedman
from scikit_posthocs import posthoc_nemenyi_friedman
from scikit_posthocs.posthocs import posthoc_nemenyi_friedman
The submodule posthocs does not exist; all functions are in top-level.

Perform Nemenyi post-hoc test after Friedman test. Input data: rows = subjects, columns = treatments. Output: pairwise p-value matrix.

import numpy as np from scikit_posthocs import posthoc_nemenyi_friedman data = np.array([ [1,2,3], [2,3,4], [3,4,5], [4,5,6] ]) result = posthoc_nemenyi_friedman(data) print(result)
Debug
Known issues
breakingIn v0.8.0+, the function signature changed: argument names switched from 'a' to 'data' and 'group' to 'group_col' (where applicable). Old code using positional arguments may break.
fix
Update to use named arguments: posthoc_nemenyi_friedman(data, group_col='groups')
affects: <0.8.0
breakingThe function 'outliers_iqr' was removed in v0.10.0. Use 'outlier_test' instead or handle IQR manually.
fix
Replace outliers_iqr(data) with outlier_test(data, method='iqr')
affects: <0.10.0
deprecatedThe 'sign_array' function is deprecated since v0.11.0. Use 'sign_plot' instead for visualization.
fix
Replace sign_array(...) with sign_plot(...) (same arguments).
affects: 0.11.0 - 0.12.0
gotchaInput data must be a 2D array-like (n_subjects x n_treatments). If you pass a 1D array or accidentally transpose, results will be wrong without error.
fix
Always verify data shape: data.shape should be (subjects, treatments).
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'posthoc_nemenyi_friedman' from 'scikit_posthocs'
Misspelled package name or wrong import path. The package is 'scikit-posthocs' on PyPI but the module is 'scikit_posthocs' (underscore, not hyphen).
fix
Install with pip install scikit-posthocs and import from scikit_posthocs (underscore).
ValueError: The number of groups must be > 2
Post-hoc tests require at least 3 groups (treatments). You passed data with only 2 columns.
fix
Ensure your data array has at least 3 columns (e.g., data.shape[1] >= 3).
TypeError: posthoc_nemenyi_friedman() missing 1 required positional argument: 'data'
In old code (pre-v0.8.0), the first argument was 'a'. Now it's 'data'.
fix
Use posthoc_nemenyi_friedman(data=your_data) or just your_data as first argument if using version >=0.8.0.
Upgrade
Version history
0.14.0latest on PyPI · released May 26, 2026
Audit
Dependencies
numpyrequiredcore math operations
pandasrequireddata table manipulation
scipyrequiredstatistical functions (e.g., stats.chi2, rankdata)
statsmodelsoptionalsome post-hoc tests rely on statsmodels functionality
matplotliboptionalplotting critical difference diagrams
Agent activity
3 hits · last 30 days
node
2
OpenAI (training)
1
Resources