fadin.kernels.DiscreteKernelFiniteSupport

class fadin.kernels.DiscreteKernelFiniteSupport(delta, n_dim, kernel, kernel_length=1.0, lower=0.0, upper=1.0, grad_kernel=None)

A class for general discretized kernels with finite support.

Parameters:
deltafloat

Step size of the discretization.

n_dimint

Dimension of the Hawkes process associated to this kernel class.

kernelstr or callable

Either define a kernel in {‘raised_cosine’ | ‘truncated_gaussian’ | ‘truncated_exponential’} or a custom kernel.

kernel_lengthfloat, default=1.

Length of kernel.

lowerfloat, default=0

Left bound of the support of the kernel. It should be between [0, W].

upperfloat, default=1

Right bound of the support of the kernel. It should be between [0, W].

grad_kernelNone or callable, default=None

If kernel in (‘raised_cosine’ | ‘truncated_gaussian’ | ‘truncated_exponential’) the gradient function is implemented. If kernel is custom, the custom gradient must be given.

Methods

grad_eval(kernel_params, time_values)

Return kernel's gradient evaluated on the given discretization.

intensity_eval(baseline, alpha, ...)

Return the intensity function evaluated on the entire grid.

kernel_eval(kernel_params, time_values)

Return kernel evaluated on the given discretization.

__init__(delta, n_dim, kernel, kernel_length=1.0, lower=0.0, upper=1.0, grad_kernel=None)

Methods

__init__(delta, n_dim, kernel[, ...])

grad_eval(kernel_params, time_values)

Return kernel's gradient evaluated on the given discretization.

intensity_eval(baseline, alpha, ...)

Return the intensity function evaluated on the entire grid.

kernel_eval(kernel_params, time_values)

Return kernel evaluated on the given discretization.