diff --git a/fadin/solver.py b/fadin/solver.py index 3549384..671544b 100644 --- a/fadin/solver.py +++ b/fadin/solver.py @@ -3,15 +3,13 @@ import matplotlib.pyplot as plt import numpy as np -from fadin.utils.utils import optimizer, projected_grid, \ - init_kernel_parameters +from fadin.utils.utils import optimizer, projected_grid from fadin.utils.compute_constants import compute_constants_fadin from fadin.loss_and_gradient import compute_gradient_fadin from fadin.kernels import DiscreteKernelFiniteSupport from fadin.init import init_hawkes_params - class FaDIn(object): """Define the FaDIn framework for estimated Hawkes processes. diff --git a/fadin/utils/utils_simu.py b/fadin/utils/utils_simu.py index 25dd64b..7378b7e 100644 --- a/fadin/utils/utils_simu.py +++ b/fadin/utils/utils_simu.py @@ -1,7 +1,7 @@ import numpy as np from scipy.optimize import minimize_scalar from scipy.interpolate import interp1d -from scipy.integrate import simps +from scipy.integrate import simpson import scipy.stats as stats @@ -84,7 +84,7 @@ def __init__(self, custom_density, params=dict(), kernel_length=10): # function to normalise the pdf over chosen domain def normalisation(self, x): - return simps(self.pdf(x), x) + return simpson(self.pdf(x), x) def create_cdf_ppf(self): # define normalization support with the given kernel length