def initialize_to_background_rate(self):
        if len(self.data_list) > 0:
            N = 0
            T = 0
            for S,_ in self.data_list:
                N += S.sum(axis=0)
                T += S.shape[0] * self.dt

            lambda0 = N / float(T)
            self.weights[:,0] = lambda0
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/models.py/DiscreteTimeStandardHawkesModel.initialize_to_background_rate/original