def compute_integrated_rate(self, data, proc=None):
        """
        We can approximate this by ignoring events within dt_max of the end.
        Since each event induces an impulse response with area W, we
        simply need to count events
        :param index:
        :param proc:
        :return:
        """
        T, Ns = data.T, data.Ns
        W = self.weight_model.W_effective
        lmbda0 = self.bias_model.lambda0

        # Compute the integral (W is send x recv)
        int_lmbda = lmbda0 * T
        int_lmbda += W.T.dot(Ns)
        assert int_lmbda.shape == (self.K,)

        # TODO: Only compute for proc (probably negligible savings)
        if proc is None:
            return int_lmbda
        else:
            return int_lmbda[proc]
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/models.py/ContinuousTimeNetworkHawkesModel.compute_integrated_rate/original