Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Poisson CDF evaluater.

This is a more stable CDF function. It can tolerate large lambda
value. While the lambda is larger than 700, the function will be a
little slower.

Parameters:
n     : your observation
lam   : lambda of poisson distribution
lower : if lower is False, calculate the upper tail CDF

        def poisson_cdf (n, lam,lower=True):
    """Poisson CDF evaluater.

    This is a more stable CDF function. It can tolerate large lambda
    value. While the lambda is larger than 700, the function will be a
    little slower.

    Parameters:
    n     : your observation
    lam   : lambda of poisson distribution
    lower : if lower is False, calculate the upper tail CDF
    """
    k = int(n)
    if lam <= 0.0:
        raise Exception("Lambda must > 0")

    if lower:
        if lam > 700:
            return __poisson_cdf_large_lambda (k, lam)
        else:
            return __poisson_cdf(k,lam)
    else:
        if lam > 700:
            return __poisson_cdf_Q_large_lambda (k, lam)
        else:
            return __poisson_cdf_Q(k,lam)
        


src/t/e/TEToolkit-1.0/TEToolkit/PeakDetect.py   TEToolkit(Download)
import subprocess
 
from TEToolkit.Prob import poisson_cdf,poisson_cdf_inv
from TEToolkit.Constants import *
from TEToolkit.IO.FeatIO import FWTrackII
               # if local_lambda == 0 :
               #     local_lambda = 0.001
                p_tmp = poisson_cdf(tlambda_peak,local_lambda,lower=False)
                if p_tmp <= 0:
                    peak_pvalue = 3100