def E_logsoftev_EdgeData(self, Data, LP):
    ''' Return log soft evidence probabilities for each word token.

        Returns
        -------
        E_logsoftev_Edges : nDistinctEdges x K matrix
                                entry n,k gives E log p( edge_ij | community k)
    '''

    # Obtain matrix where col k = E[ log phi[k] ], for easier indexing
    N = Data.nNodeTotal # number of nodes
    E = Data.nEdgeTotal # number of distinct edges (1s and 0s)

    ElogLamA = np.zeros(self.K)
    ElogLamB = np.zeros(self.K)
    E_logsoftev_EdgeLik = np.zeros( (Data.nEdgeTotal, self.K) ) # actual responsibilities for edges
    E_logsoftev_EdgeEps = np.zeros( Data.nEdgeTotal ) # actual responsibilities for edges

    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)

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