Skip to main content

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, binomial_significance=False, use_avx=True, max_alpha_beta=False, scale_result=True, deduplicate_data=True)

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 representing d-dimensional observations,
  • cdf: 2-dimensional numpy number array with rows representing second sampled-dimensional observations,
  • counts_rvs: in case of rvs having multiple duplicates, an array without duplicates and a separate array of counts can be provided,
  • counts_cdf: in case of cdf having multiple duplicates, an array without duplicates and a separate array of counts can be provided, additionally if cdf is not given counts_cdf are taken as counts of elements of rvs array,
  • n_jobs: number of threads used during calculation,
  • permutation_samples: number of times data is shuffled and the statistic value is calculated to estimate pvalue,
  • binomial_significance: boolean value indicating if statistical significance should be calculated. Defaults to False,
  • use_avx: boolean value indicating if AVX2 instructions should be used during the calculations. Defaults to True,
  • max_alpha_beta: boolean value indicating how λ and β values should be combined. Value True results in max(λ, β). λ+β is used otherwise.
  • scale_result: Whether to scale the statistic by $\frac{1}{2}\sqrt{\frac{|rvs|+|cdf|}{|rvs|\times|cdf|}}$,
  • deduplicate_data: Whether to deduplicate data points before running the algorithms.

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_significance is set to True,
  • pvalue calculated using permutation method if permutation_samples is larger than 0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

multidimensionalks-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

multidimensionalks-0.0.7-cp311-cp311-macosx_10_15_x86_64.whl (69.0 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

multidimensionalks-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

multidimensionalks-0.0.7-cp310-cp310-macosx_10_15_x86_64.whl (69.0 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

multidimensionalks-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

multidimensionalks-0.0.7-cp39-cp39-macosx_10_15_x86_64.whl (69.0 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

multidimensionalks-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

multidimensionalks-0.0.7-cp38-cp38-macosx_10_15_x86_64.whl (69.0 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

multidimensionalks-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

multidimensionalks-0.0.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

File details

Details for the file multidimensionalks-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6fe2e613bb780b56087ccfc54491d48666b110bab88991d41446dcf86e08234e
MD5 939979bddd993fa61ca56e8162f94c43
BLAKE2b-256 7328c40e4574f44af3e772084c4ac94f373af64e5757e7b3d3dc5d9e815d16d6

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a3c40e5132aed145cc7a56b89489b3cd6f380de61a62d0bce50d15ce50907780
MD5 a1fc1d6bb077ba98ac37a14ed35bf9be
BLAKE2b-256 693a0d1555de2aec824cfad3410460f14b1316577ca688b3e4d2db6df905d2fd

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f74943b58847ef5d536054067f1e5348b9df91292b9306f306dcaa91c374f2e0
MD5 0e25c0f1969af4f95c809a3003284aea
BLAKE2b-256 df51b382d13c64528a19dc0d60b767757266c492730ea7706fb4f8958f7255f0

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 884f8ae31186e31e761100033dbd37b7a17297d01ffe4e053ce034c4aaab7877
MD5 446bb7e863dc3e1c9171800f92a1375f
BLAKE2b-256 bc600ca3a9fabe4974a064f2d05b1dfd23fa1e2823bec083d46f5ee49d78bbb1

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ba5f4177361061b6d0232f1bc23fd06d346e27a708202c72791a3415c2c2f42
MD5 7a953d7eec324872fff646dc318d0d50
BLAKE2b-256 736be27fd54749fae8cee9974a34985ea3b68f9bc33662a1ca75dc0397ede307

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5c90491b85125616a0e0370d18789d210e544c21d87aee4d2964810796ae57a5
MD5 cca10c6cecc678657fc5e8e057e61448
BLAKE2b-256 335e0acdac7047fe8676cc4b8aab689119e2645e7d8bb8fa6af8cb1269bd6b64

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8d8c11c6eae09f58b50fb16e850749883b43dcb6883bbce398395301c8fcfba
MD5 f3fcee95e1a4d7f5f067fff91a28feca
BLAKE2b-256 8526d61fb5431ddd03ff1bd3628cec8fce91db865319efcb375ee5a6a1304328

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6f0a11646f1c0784c461cef83c9bc4424b09d141dc98e4b1a97a539cf47b17e4
MD5 573ff2c6e0a04e6506d38456630fb46f
BLAKE2b-256 6392197d91c5a7c1536e1d1f4505166901bc609ec6b2117ed474a735f1002b80

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 927f3abdaf7ecb72ccf92edce74d8eca9af65a1250e3a626090f8c8040bcd1cc
MD5 3216e79c8ac6d926743c5d30cf76ced2
BLAKE2b-256 254934cb170ff3268bfd7eccbbc4d2e6fa37cf58750d394c3d738709b132aa8f

See more details on using hashes here.

File details

Details for the file multidimensionalks-0.0.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for multidimensionalks-0.0.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f7a0b379ee6b1b1e8447eaa151f80e80a95e1d2202d6f507b8626168cd413dcd
MD5 48685e5fd52e7e44601d5f9fb376305d
BLAKE2b-256 7f0187e4930161b6091a745657947c04f77fa030a82f38a60f0dffbaf6f6e84a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page