Skip to main content

Estimate very small p-values in permutation tests using multilevel splitting

Project description

hamstest

hamstest estimates arbitrarily small p-values in two-sample permutation tests using hash-augmented adaptive multilevel splitting Monte Carlo.

Installation

pip install hamstest

Plotting helpers used by notebooks are optional:

pip install "hamstest[plotting]"

Quick start

from hamstest import Estimator
from hamstest.permutation_tests.kstest import KSTest

test = KSTest(100, 900)
target_score = int(0.333 * 100 * 900)
estimator = Estimator(test, sample_size=101, seed=0)
log_pvalue, log_pvalue_stderr = estimator.estimate(target_score)

test should implement the permutation-test interfaces exported by hamstest: AbstractPermutationTest and AbstractPermutationTestSubset. The package also ships reference implementations in hamstest.permutation_tests.

Adapter packages

The package includes the C++ dispatcher and a helper command for starting custom native adapters:

hamstest-adapter-init my_hamstest_adapter --kind my_test

Example adapters for KS and Mann-Whitney U tests are developed in the same GitHub repository and are published separately.

Project

Source code and issue tracking are available at https://github.com/golikov-nik/hamstest.

Project details


Download files

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

Source Distribution

hamstest-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hamstest-0.1.0-cp313-cp313-win_amd64.whl (286.7 kB view details)

Uploaded CPython 3.13Windows x86-64

hamstest-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (110.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

hamstest-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (94.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hamstest-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl (98.6 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

hamstest-0.1.0-cp312-cp312-win_amd64.whl (286.6 kB view details)

Uploaded CPython 3.12Windows x86-64

hamstest-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (110.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

hamstest-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (94.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hamstest-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl (98.5 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

hamstest-0.1.0-cp311-cp311-win_amd64.whl (283.8 kB view details)

Uploaded CPython 3.11Windows x86-64

hamstest-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (109.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

hamstest-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (93.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hamstest-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (96.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

hamstest-0.1.0-cp310-cp310-win_amd64.whl (283.3 kB view details)

Uploaded CPython 3.10Windows x86-64

hamstest-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (108.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

hamstest-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (92.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

hamstest-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl (95.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file hamstest-0.1.0.tar.gz.

File metadata

  • Download URL: hamstest-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hamstest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f19fa940a5a139c37909f853ed2b6773648d9d4308fb6e99c31b3acb4994df08
MD5 9ecf219f4e54cb0f590859b968293a9a
BLAKE2b-256 7b802d5b708698f469f4846086bf024c011362d3fdb90e370270c57812883c7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0.tar.gz:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: hamstest-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 286.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hamstest-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1ab36f49ea6b1e5a06bc650672cef2ea31099b9a3ae2a23fab61e5a3b963e535
MD5 aa7013f57ebbd27bb4b12ef0bf47432e
BLAKE2b-256 177b6adb9a58ffc4674b40433fc5cc9bce954cc8d4f8a90c9ab257497db2e7f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d13b2b38ce3440bddfd2a0279bce26cf864b2380ac6599307942adc1ef97731
MD5 2f0a7c0877f3b08e1ea9d2836165e2b5
BLAKE2b-256 4bf89217dbf404ea8f8a629d91fc555ec82fbea93631612aa421d6caa4dfa5b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 02a086647ff8aaf07dd53bab27e734ecd536e286573cf17cbd52090dccae38f4
MD5 ad74b419e87317977dfc99cf1ad9d5f0
BLAKE2b-256 e82bcec98d01806be396d1dfc842169f3597ac2a4a734e2378b1f369650fd4bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e77ab9bf5eeb0d512b7baad5406dff660daf2d5859726f4f84d2a31089dcfbc2
MD5 f936e7b64c8e09430004e5aa9214dfa0
BLAKE2b-256 4148fbc24ce42b41edaf131371b0eebbe109853cb7e1abe5762be2ba2904fea9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: hamstest-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 286.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hamstest-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 269c012ad13da9281da216d7df15f75f3b39af98f137a0ecd3a1ba3c329c1e74
MD5 5194bfb49e3208aefe893db7710d985f
BLAKE2b-256 c26bebc9d9bfe040b2f7afd4c6aa9f6d5e57b4293f1b9f2c410f431f78877357

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80bebefb61e55a812c191d051e791143cd2622fe38c458bc55c2899d806e82b3
MD5 ae6041ebd0debd1f15ac6901e71ad534
BLAKE2b-256 e7839ec2a7d5a6c413afce24d0cc79bd2649247978ac3cbb24c919dfa62840ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a6d787d75ec88b5f9056ae71818cf1c562d6537cfc7fa168912bf6a525082238
MD5 afae14ea4414f81ff0bb8582c61a623b
BLAKE2b-256 b138750b9ed43fc702ec00b44f743d4e9fe41fdb1987df194758d03c1f1da19c

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a47d91118c0a156c82339b21c6abc8aae70d4859f6388ace3960c84018b39f9d
MD5 81402b4bef148d945fdff73097c37081
BLAKE2b-256 bbb6b061c4ac4a98985a4c2a507837beef178e49599d71febaa4b33b6dd4efda

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: hamstest-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 283.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hamstest-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7a8878044fdf8e098c30cb99b3b5abc7badb9941d58444a2fe93561a52b39e26
MD5 9b6cf49c8b227ad7ff125202abb3426d
BLAKE2b-256 8e4b55e9f023919f816eb08f3e893f14b1375a7cfd25cf1c25848034c5b6e639

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 902e2054dc9276dfbd16791521d924704ade12be01e2f5d05506e0c127320179
MD5 2ca8e4b33b0137d466f3aaab5307cf81
BLAKE2b-256 1987346c4b66c6c1c787c8f578c9f6244c2a2b6adaadc65242ed3f40af04d223

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3f691abb0847be5dda37a21b9d583e813900ace8e63424989d00c49e1dd498c1
MD5 8d7b82db3c9fef881b0a872b421800e4
BLAKE2b-256 aab324532df19da15cd6dcdaa63bba85eb61fe94174e1f606eb298538fa58b7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 63acd9572bcce89b5f31492ef143b2cdf100c29fa4eae7d6d1a7c09f14e87b10
MD5 e3ebd9d5c6539d534e02d6ab8fec1c92
BLAKE2b-256 dc8e2c4fb4c17fe152c54e3e693218abf0e5ce5b0034ac8a2cb1b682f170c424

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: hamstest-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 283.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hamstest-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8010b135ad9b9f3529c0ce69c44812c9cc76b1d8cb7537f7fa604d9734607bdc
MD5 451a3a14a031701b6a4677a56bebf37e
BLAKE2b-256 f71d672cfc95295cbab6083ea03d41437e25ef51e1fc8929b01c2ff652fa091f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd0fbcc887481a59077f01bc0e9fe44e5790e0e0c45c092ba07fe0c8cb731414
MD5 3dc7c299a9331f6d137f28487c9771ef
BLAKE2b-256 c3317e501b6bc116c6f394de49c5bba3342bf84d0a75b827dc8812de2a0fdb9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0631b34ea6759685132c38bc9526608fdb0b3c35bfa3c834852b8136bcf0fa98
MD5 acb5f31e987771dd9991af08356bc0c6
BLAKE2b-256 77685e03a3721835dbc1726dfd8d50f5bc79508f5e2315896a754ed28cab0f0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamstest-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for hamstest-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9c8ac45131fc7e4f03ee5bef99d8b7d9ef41422b91343b6ae75080e8036b893d
MD5 1617dfc951865a89f73bd52278c1c6d0
BLAKE2b-256 e2be67ef5ffe15e376646df1aed5b81b5e144102533811fb436b1144ff4a2639

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamstest-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: publish-hamstest.yml on golikov-nik/hamstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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