Example #1
0
File: niw.py Project: mattjj/svae
def standard_to_natural(S, m, kappa, nu):
    b = np.expand_dims(kappa, -1) * m
    A = S + outer(b, m)
    return pack_dense(A, b, kappa, nu)
Example #2
0
def standard_to_natural(S, m, kappa, nu):
    b = np.expand_dims(kappa, -1) * m
    A = S + outer(b, m)
    return pack_dense(A, b, kappa, nu)
Example #3
0
File: niw.py Project: mattjj/svae
def natural_to_standard(natparam):
    A, b, kappa, nu = unpack_dense(natparam)
    m = b / np.expand_dims(kappa, -1)
    S = A - outer(b, m)
    return S, m, kappa, nu
Example #4
0
def natural_to_standard(natparam):
    A, b, kappa, nu = unpack_dense(natparam)
    m = b / np.expand_dims(kappa, -1)
    S = A - outer(b, m)
    return S, m, kappa, nu