Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/maths/stats/ks.py   cogent(Download)
from numpy import sqrt, log, pi, exp, fabs, floor, zeros, asarray,\
            dot as matrixmultiply, ones, array, reshape, ravel, sum, arange
from cogent.maths.stats.special import combinations
 
__author__ = "Gavin Huttley"
    to = floor(n * (1-statistic))+1
    j = arange(0, to)
    coeffs = asarray([log(combinations(n, i)) for i in j])
    p = sum(exp(coeffs + (n-j)*log(1-statistic-j/n) + \
                                            (j-1)*(log(statistic+j/n))))

src/p/y/pycogent-HEAD/cogent/maths/stats/ks.py   pycogent(Download)
from numpy import sqrt, log, pi, exp, fabs, floor, zeros, asarray,\
            dot as matrixmultiply, ones, array, reshape, ravel, sum, arange
from cogent.maths.stats.special import combinations
 
__author__ = "Gavin Huttley"
    to = floor(n * (1-statistic))+1
    j = arange(0, to)
    coeffs = asarray([log(combinations(n, i)) for i in j])
    p = sum(exp(coeffs + (n-j)*log(1-statistic-j/n) + \
                                            (j-1)*(log(statistic+j/n))))

src/c/o/cogent-1.5.3/tests/test_maths/test_stats/test_special.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for special functions used in statistics.
"""
from cogent.util.unit_test import TestCase, main
from cogent.maths.stats.special import permutations, permutations_exact, \
        previous_value = 252.00001
        while start <= end:
            obs = combinations(10,start)
            assert lower_lim <= obs <= upper_lim
            assert obs < previous_value

src/p/y/pycogent-HEAD/tests/test_maths/test_stats/test_special.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for special functions used in statistics.
"""
from cogent.util.unit_test import TestCase, main
from cogent.maths.stats.special import permutations, permutations_exact, \
        previous_value = 252.00001
        while start <= end:
            obs = combinations(10,start)
            assert lower_lim <= obs <= upper_lim
            assert obs < previous_value