def expected_W_given_A(self, A):
        """
        Compute the expected W given A under the variational approximation
        :param A:   Either zero or 1
        """
        return A * (self.mf_kappa_1 / self.mf_v_1) + \
               (1.0 - A) * (self.mf_kappa_0 / self.mf_v_0)
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/internals/weights.py/GammaMixtureWeights.expected_W_given_A/original