Skip to main content

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 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,
  • binomial_significance: boolean value indicating if statistical significance should be calculated. Defaults to False,
  • 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 if AVX instructions should be used during the calculations. 0 disables avx, 3 means to try the best supported set, 1 will try to use AVX512 instruction set and use no otherwise, 2 will try to use AVX2. Defaults to 3,
  • max_alpha_beta: boolean value indicating how λ and β values should be combined. Value True (default) results in max(λ, β). (λ+β)/2 is 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_significance is set to True,
  • pvalue calculated using permutation method if permutation_samples is larger than 0.

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)

Table of built distributions (wheels) for multidimensionalks 0.2.21
File
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

Release history Release notifications | RSS feed

This release

0.2.21 This release

5 release files

0.2.19

5 release files

0.2.18

5 release files

0.2.17

5 release files

0.2.9

2 release files

0.2.7

10 release files

0.2.6

10 release files

0.2.5

10 release files

0.2.4

10 release files

0.2.3

10 release files

0.2.1

10 release files

0.1.9

10 release files

0.1.8

10 release files

0.1.7

10 release files

0.1.6

10 release files

0.1.5

10 release files

0.1.4

10 release files

0.1.3

10 release files

0.1.2

10 release files

0.1.1

10 release files

0.1.0

10 release files

0.0.9

10 release files

0.0.8

10 release files

0.0.7

10 release files

0.0.6

10 release files

0.0.5

7 release files

0.0.4

6 release files

0.0.3

4 release files

0.0.2

4 release files

0.0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page