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

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/maths/stats/distribution.py   cogent(Download)
"""
from __future__ import division
from cogent.maths.stats.special import erf, erfc, igamc, igam, betai, log1p, \
    expm1, SQRTH, MACHEP, MAXNUM, PI, ndtri, incbi, igami, fix_rounding_error,\
    ln_binomial
    if (successes < 0) or (trials < successes):
        raise ValueError, "Binomial successes must be between 0 and trials."
    return exp(ln_binomial(successes, trials, prob))
 
def f_low(df1, df2, x):

src/p/y/pycogent-HEAD/cogent/maths/stats/distribution.py   pycogent(Download)
"""
from __future__ import division
from cogent.maths.stats.special import erf, erfc, igamc, igam, betai, log1p, \
    expm1, SQRTH, MACHEP, MAXNUM, PI, ndtri, incbi, igami, fix_rounding_error,\
    ln_binomial
    if (successes < 0) or (trials < successes):
        raise ValueError, "Binomial successes must be between 0 and trials."
    return exp(ln_binomial(successes, trials, prob))
 
def f_low(df1, df2, x):

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, \
        for (key, value) in expected.items():
            min_val, max_val = value
            assert min_val < ln_binomial(*key) < max_val
            #self.assertFloatEqualRel(binomial_exact(*key), value, 1e-4)
 
        previous_value = -1.784
        while start <= end:
            obs = ln_binomial(start,5,.3)
            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, \
        for (key, value) in expected.items():
            min_val, max_val = value
            assert min_val < ln_binomial(*key) < max_val
            #self.assertFloatEqualRel(binomial_exact(*key), value, 1e-4)
 
        previous_value = -1.784
        while start <= end:
            obs = ln_binomial(start,5,.3)
            assert lower_lim <= obs <= upper_lim
            assert obs > previous_value