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.
Metadata
Release files for multidimensionalks 0.2.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| multidimensionalks-0.2.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64 | Details |
| multidimensionalks-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.17+ x86-64 | Details |
| multidimensionalks-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details |
| multidimensionalks-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64 | Details |
| multidimensionalks-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details |
Total release size: 11.3 MB
Release files / multidimensionalks-0.2.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | multidimensionalks-0.2.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
87d0954e1bce4d670bf8e07cc4a4dcf683c1491b309c8b7e089a2ba4f9cca108
|
|
BLAKE2b-256 checksum How to use checksums |
9eba86c9123b1fe636b210c763f2cb70ba488c79dfcaefc0aa851f2bf2b0067d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / multidimensionalks-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | multidimensionalks-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a3b98d5088b85b9c13d9908268872912dfad2ea841feae793bac05d556d95046
|
|
BLAKE2b-256 checksum How to use checksums |
637a1266f8a74785a24a9e5641017af4b596c1d2fbbce5ea4f5ce8f4196ea054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / multidimensionalks-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | multidimensionalks-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
25ef49ff6423dbfe9593ab4c8d7f3464e8041496639170c4447093a5f2597a9f
|
|
BLAKE2b-256 checksum How to use checksums |
39726bb1e67ed6c957426a460160514a09c10907e4e8f7a53caea4ca77af4eaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / multidimensionalks-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | multidimensionalks-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
19c2c4b3cf9906a93fa042947c9f75d152f52986634d62672741744fa220870a
|
|
BLAKE2b-256 checksum How to use checksums |
2e1f4b81f1068849f4bd69c986144444be50911d17753162b0eb8f05ae8541a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / multidimensionalks-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | multidimensionalks-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
114bbeca0848cd8c67f200b72e11085abae7deaaadd4707eac96d778b9dbe06c
|
|
BLAKE2b-256 checksum How to use checksums |
b0e1d7ed786ec37ef0fac11acebf56c68214f4d8cf67aa24111b7ac3461381db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|