コード例 #1
0
ファイル: censored_data.py プロジェクト: aasensio/pymc3
def normal_lccdf(mu, sigma, x):
    z = (x - mu) / sigma
    return tt.switch(
        tt.gt(z, 1.0),
        tt.log(tt.erfcx(z / tt.sqrt(2.)) / 2.) - tt.sqr(z) / 2.,
        tt.log1p(-tt.erfc(-z / tt.sqrt(2.)) / 2.)
    )
コード例 #2
0
def normal_lccdf(mu, sigma, x):
    z = (x - mu) / sigma
    return tt.switch(
        tt.gt(z, 1.0),
        tt.log(tt.erfcx(z / tt.sqrt(2.0)) / 2.0) - tt.sqr(z) / 2.0,
        tt.log1p(-tt.erfc(-z / tt.sqrt(2.0)) / 2.0),
    )
コード例 #3
0
ファイル: censored_data.py プロジェクト: rsumner31/pymc3-23
def normal_lcdf(mu, sigma, x):
    z = (x - mu) / sigma
    return tt.switch(
        tt.lt(z, -1.0),
        tt.log(tt.erfcx(-z / tt.sqrt(2.)) / 2.) - tt.sqr(z) / 2,
        tt.log1p(-tt.erfc(z / tt.sqrt(2.)) / 2.)
    )
コード例 #4
0
def normal_lcdf(mu, sigma, x):
    """Compute the log of the cumulative density function of the normal."""
    z = (x - mu) / sigma
    return tt.switch(
        tt.lt(z, -1.0),
        tt.log(tt.erfcx(-z / tt.sqrt(2.0)) / 2.0) - tt.sqr(z) / 2.0,
        tt.log1p(-tt.erfc(z / tt.sqrt(2.0)) / 2.0),
    )
コード例 #5
0
ファイル: dist_math.py プロジェクト: alexander-belikov/pymc3
def normal_lcdf(mu, sigma, x):
    """Compute the log of the cumulative density function of the normal."""
    z = (x - mu) / sigma
    return tt.switch(
        tt.lt(z, -1.0),
        tt.log(tt.erfcx(-z / tt.sqrt(2.)) / 2.) - tt.sqr(z) / 2.,
        tt.log1p(-tt.erfc(z / tt.sqrt(2.)) / 2.)
    )
コード例 #6
0
def invprobit(x):
    return .5 * erfc(-x / sqrt(2.))
コード例 #7
0
def phi(x):
    return 0.5 * (tt.erfc(-x / tt.sqrt(2)))
コード例 #8
0
def invprobit(x):
    return 0.5 * erfc(-x / sqrt(2))
コード例 #9
0
ファイル: math.py プロジェクト: alexander-belikov/pymc3
def invprobit(x):
    return .5 * erfc(-x / sqrt(2.))
コード例 #10
0
def cdf(mu, sd, value):
    z = zvalue(value, mu=mu, sd=sd)
    return tt.erfc(-z / tt.sqrt(2.)) / 2.
コード例 #11
0
ファイル: math.py プロジェクト: taku-y/pymc3
def invprobit(x):
    return 0.5 * erfc(-x / sqrt(2))
コード例 #12
0
def logp_emg_weighted(x, mu, sigma, lamb, weighted):
    inner_erfc = (mu + lamb * (sigma ** 2) - x) / (np.sqrt(2) * sigma)
    return (
        1
        / weighted
        * (tt.log(lamb / 2) + (lamb / 2) * (2 * mu + lamb * (sigma ** 2) - 2 * x) + tt.log(tt.erfc(inner_erfc)))
    )
コード例 #13
0
def logp_emg(x, mu, sigma, lamb):
    inner_erfc = (mu + lamb * (sigma ** 2) - x) / (np.sqrt(2) * sigma)
    return tt.log(lamb / 2) + (lamb / 2) * (2 * mu + lamb * (sigma ** 2) - 2 * x) + tt.log(tt.erfc(inner_erfc))
コード例 #14
0
ファイル: gpr_math.py プロジェクト: gopal-m/hyperopt-gpsmbo
def s_normal_logcdf(x, mean, var):
    z = (x - mean) / TT.sqrt(var)
    return TT.log(.5) + TT.log(TT.erfc(-z / np.sqrt(2)))
コード例 #15
0
ファイル: gpr_math.py プロジェクト: gopal-m/hyperopt-gpsmbo
def s_normal_cdf(x, mean, var):
    z = (x - mean) / TT.sqrt(var)
    return .5 * TT.erfc(-z / np.sqrt(2))
コード例 #16
0
ファイル: acquisition.py プロジェクト: wujian16/sgmcmc
def cdf(sample, location=0, var=1):
    z = (sample - location) / T.sqrt(var)
    return .5 * (T.erfc(-z / SQRT2))