def log_likelihood(self, indices=None, ks=None):
        ll = 0

        if indices is None:
            indices = np.arange(len(self.data_list))
        if isinstance(indices, int):
            indices = [indices]

        for index in indices:
            S,F = self.data_list[index]
            R = self.compute_rate(index, ks=ks)

            if ks is not None:
                ll += (S[:,ks] * np.log(R) -R*self.dt).sum()
            else:
                ll += (S * np.log(R) -R*self.dt).sum()

        return ll
Convert AdUnit targeting model to dfp dictionary
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/models.py/DiscreteTimeStandardHawkesModel.log_likelihood--crossover with--dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/adapters/dfp/targeting_utils.py/_adunit_to_dfp