

def conditional_cov(self, augmented_data, flat=False):
    O = augmented_data['omega']
    T = augmented_data['T']
    Km1 = (self.K - 1)
    if flat:
        cov = (1.0 / O)
    else:
        cov = np.zeros((T, Km1, Km1))
        for t in xrange(T):
            cov[t, :, :] = np.diag((1.0 / O[t, :]))
    return cov

dataset/ETHPy150Open HIPS/pgmult/pgmult/distributions.py PGMultinomialRegression.conditional_cov/original