Multidimensional KS test module in python
Project description
multidimensionalks
Python c extension with method for calculating multidimensional Kolmogorov-Smirnov test
multidimensionalks.test(rvs, cdf=None, counts_rvs=None, counts_cdf=None, n_jobs=1, permutation_samples=0, draw_samples=False, binomial_significance=False, use_avx=3, max_alpha_beta=True, scale_result=False, deduplicate_data=True, debug=False)
Example usage
from multidimensionalks import test
import numpy as np
test(np.array([[1, 2, 3], [1, 3, 2]]), cdf=np.array([[1,2,2]]))
Parameters
rvs: 2-dimensional numpy number array with rows representingd-dimensional observations,cdf: 2-dimensional numpy number array with rows representing second sampled-dimensional observations,counts_rvs: in case ofrvshaving multiple duplicates, an array without duplicates and a separate array of counts can be provided,counts_cdf: in case ofcdfhaving multiple duplicates, an array without duplicates and a separate array of counts can be provided, additionally ifcdfis not givencounts_cdfare taken as counts of elements ofrvsarray,n_jobs: number of threads used during calculation,binomial_significance: boolean value indicating if statistical significance should be calculated. Defaults toFalse,permutation_samples: number of times data is shuffled and the statistic value is calculated to estimate pvalue,draw_samples: boolean value indicating that samples should be drawn with replacement instead of permutating (defaults to permutating),use_avx: integer value indicating ifAVXinstructions should be used during the calculations.0disables avx,3means to try the best supported set,1will try to use AVX512 instruction set and use no otherwise,2will try to useAVX2. Defaults to3,max_alpha_beta: boolean value indicating how λ and β values should be combined. ValueTrue(default) results inmax(λ, β).(λ+β)/2is used otherwise.scale_result: Whether to scale the statistic by $\sqrt{\frac{|rvs|+|cdf|}{|rvs|\times|cdf|}}$ (default False),deduplicate_data: Whether to deduplicate data points before running the algorithms,debug: Whether to print debug data to stdout.
Return value
If no pvalue calculation method is selected returns ks statistic value, otherwise returns a tuple:
- ks statistic,
- pvalue calculated using statistical method if
binomial_significanceis set toTrue, - pvalue calculated using permutation method if
permutation_samplesis larger than0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 multidimensionalks-0.2.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: multidimensionalks-0.2.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87d0954e1bce4d670bf8e07cc4a4dcf683c1491b309c8b7e089a2ba4f9cca108
|
|
| MD5 |
94ecb414bbb6514229e2a6a2a6230475
|
|
| BLAKE2b-256 |
9eba86c9123b1fe636b210c763f2cb70ba488c79dfcaefc0aa851f2bf2b0067d
|
File details
Details for the file multidimensionalks-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: multidimensionalks-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3b98d5088b85b9c13d9908268872912dfad2ea841feae793bac05d556d95046
|
|
| MD5 |
492ed3522af371edc6265830b148aaf9
|
|
| BLAKE2b-256 |
637a1266f8a74785a24a9e5641017af4b596c1d2fbbce5ea4f5ce8f4196ea054
|
File details
Details for the file multidimensionalks-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: multidimensionalks-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25ef49ff6423dbfe9593ab4c8d7f3464e8041496639170c4447093a5f2597a9f
|
|
| MD5 |
c35c82e7f2d01f9e4a1f192d672fca05
|
|
| BLAKE2b-256 |
39726bb1e67ed6c957426a460160514a09c10907e4e8f7a53caea4ca77af4eaa
|
File details
Details for the file multidimensionalks-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: multidimensionalks-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19c2c4b3cf9906a93fa042947c9f75d152f52986634d62672741744fa220870a
|
|
| MD5 |
dbed7babdeab483ec79f08f121d71747
|
|
| BLAKE2b-256 |
2e1f4b81f1068849f4bd69c986144444be50911d17753162b0eb8f05ae8541a6
|
File details
Details for the file multidimensionalks-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: multidimensionalks-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
114bbeca0848cd8c67f200b72e11085abae7deaaadd4707eac96d778b9dbe06c
|
|
| MD5 |
b96f5f35fbc5621147655ccbbc6b11ce
|
|
| BLAKE2b-256 |
b0e1d7ed786ec37ef0fac11acebf56c68214f4d8cf67aa24111b7ac3461381db
|