arsenal.maths.stats package

Submodules

arsenal.maths.stats.corpus_permutation_test module

Paired permutation test for corpus statistics (non-additive).

arsenal.maths.stats.corpus_permutation_test.paired_permutation_test(xs, ys, statistic, threshold=0.05, R=10000, verbose=1)[source]

Pair permutation test

arsenal.maths.stats.corpus_permutation_test.test_f1()[source]

arsenal.maths.stats.permutation_test module

arsenal.maths.stats.permutation_test.bf_paired_perm_test(xs, ys, statistic=<sphinx.ext.autodoc.importer._MockObject object>)[source]
arsenal.maths.stats.permutation_test.mc_paired_perm_test(xs, ys, samples=10000, statistic=<sphinx.ext.autodoc.importer._MockObject object>)[source]

Paired permutation test

>>> xs = np.array([1,2,3,4,5,6])
>>> ys = np.array([2,3,4,5,6,7])
>>> u = mc_perm_test(xs, ys, 1000)
>>> p = mc_paired_perm_test(xs, ys, 1000)

Under the unpaired test, we do not have a significant difference because the systems only differ in two positions.

>>> assert u > .40
Under the Paired test, we have more power!
>>> assert p < .05
arsenal.maths.stats.permutation_test.mc_perm_test(xs, ys, samples=10000, statistic=<sphinx.ext.autodoc.importer._MockObject object>)[source]
arsenal.maths.stats.permutation_test.verbose_paired_perm_test(xs, ys, nmc=10000, threshold=0.05, fmt='%.4f')[source]

Let xs be the system you want be greater.

Module contents