def conditional_prec(self, augmented_data, flat=False):
        """
        Compute the conditional mean \psi given \omega
        :param augmented_data:
        :return:
        """
        O = augmented_data["omega"]
        T = augmented_data["T"]
        Km1 = self.K-1

        if flat:
            prec = O
        else:
            prec = np.zeros((T, Km1, Km1))
            for t in xrange(T):
                prec[t,:,:] = np.diag(O[t,:])

        return prec
dataset/ETHPy150Open HIPS/pgmult/pgmult/distributions.py/PGMultinomialRegression.conditional_prec/original