

def E_logsoftev_EdgeData(self, Data, LP):
    ' Return log soft evidence probabilities for each word token.\n\n        Returns\n        -------\n        E_logsoftev_Edges : nDistinctEdges x K matrix\n                                entry n,k gives E log p( edge_ij | community k)\n    '
    N = Data.nNodeTotal
    E = Data.nEdgeTotal
    ElogLamA = np.zeros(self.K)
    ElogLamB = np.zeros(self.K)
    E_logsoftev_EdgeLik = np.zeros((Data.nEdgeTotal, self.K))
    E_logsoftev_EdgeEps = np.zeros(Data.nEdgeTotal)
    ElogEps1 = np.log(self.epsilon)
    ElogEps0 = np.log((1 - self.epsilon))
    for k in xrange(self.K):
        ElogLamA[k] = self.comp[k].ElogLamA
        ElogLamB[k] = self.comp[k].ElogLamB
    E_logsoftev_EdgeLik[Data.ind1, :] = ElogLamA
    E_logsoftev_EdgeLik[Data.ind0, :] = ElogLamB
    E_logsoftev_EdgeEps[Data.ind1] = ElogEps1
    E_logsoftev_EdgeEps[Data.ind0] = ElogEps0
    return (E_logsoftev_EdgeLik, E_logsoftev_EdgeEps)

dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/obsmodel/BernRelObsModel.py BernRelObsModel.E_logsoftev_EdgeData/original