This is code to calculate the Cliff's Delta effect size metric, which strangely is not in NumPy/SciPy.stats.
@Timm had this as a gist, and @mtorchiano has R code with tests. I have merged them. Well, Marco's code does a lot more. I merged his tests.
cliffs_delta
The Cliff's Delta statistic is a non-parametric effect size measure that quantifies the amount of difference between two groups of observations beyond p-values interpretation. This measure can be understood as a useful complementary analysis for the corresponding hypothesis testing.
Installation
This package can either be installed using pip or from a tarball using the standard Python distutils.
If you are installing using pip, you don’t need to download anything as the latest version will be downloaded for you from PyPI:
pip install cliffs-delta
Example & Usage
Import the method cliffs_delta from cliffs_delta
from cliffs_delta import cliffs_delta
x1 = [10, 20, 20, 20, 30, 30, 30, 40, 50, 100]
x2 = [10, 20, 30, 40, 40, 50]
d, res = cliffs_delta(x1, x2)
print(d,res)
-0.06666666666666667 negligible
Metadata
Release files for cliffs-delta 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cliffs_delta-1.0.0.tar.gz | 3.1 kB | Without provenance | Details for cliffs_delta-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cliffs_delta-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cliffs_delta-1.0.0-py3-none-any.whl |
Total release size: 13.5 kB
Release files / cliffs_delta-1.0.0.tar.gz
| Download URL | cliffs_delta-1.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
909595ceaf051390fc82e662fdefb5ccca2cd3f49bb23531d903a53ae9f07e43
|
|
BLAKE2b-256 checksum How to use checksums |
95539eba11330149a8abbb3e41c956c4bf6b93731c460fd921c62b0735047c69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / cliffs_delta-1.0.0-py3-none-any.whl
| Download URL | cliffs_delta-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ec087e8254861204aab79e222b2e863a79f3d6f35d69e14f8b188fb6c5b048f
|
|
BLAKE2b-256 checksum How to use checksums |
8c37dca1aec82037fac98ef6e4f027cbc03bf323c19269e813be98ded42a6ffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for cliffs-delta 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.