Struct Hawkes

Source
pub struct Hawkes<T, K: Kernel> { /* private fields */ }
Expand description

The Hawkes process is a self-exciting point process: the intensity process is stochastic and defined by $$ \lambda_t = \lambda_0(t) + \int_0^t g(t-s) dN_s $$ where $g$ is called the kernel of the Hawkes process.

Implementations§

Source§

impl<T, K: Kernel> Hawkes<T, K>

Source

pub fn get_kernel(&self) -> &K

Get Hawkes kernel object.

Source

pub fn get_background(&self) -> &T

Get Hawkes background intensity.

Source§

impl Hawkes<PoissonProcess, PowerLawKernel>

Source

pub fn new(alpha: f64, beta: f64, delta: f64, lambda0: f64) -> Self

Create a new power law Hawkes model instance.

Source§

impl Hawkes<PoissonProcess, ExpKernel>

Source

pub fn new(alpha: f64, beta: f64, lambda0: f64) -> Self

Source§

impl<F> Hawkes<DeterministicBackground<F>, ExpKernel>
where F: Fn(f64) -> f64 + Send + Sync,

Source

pub fn new(alpha: f64, beta: f64, func: F, max_lbda0: f64) -> Self

Trait Implementations§

Source§

impl<T: Debug, K: Debug + Kernel> Debug for Hawkes<T, K>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F> TemporalProcess for Hawkes<DeterministicBackground<F>, ExpKernel>
where F: Fn(f64) -> f64 + Send + Sync,

Source§

fn sample(&self, tmax: f64) -> TimeProcessResult

Sample a sequence of events of the process. Returns: event timestamps and intensity process.
Source§

fn batch_sample(&self, tmax: f64, num_batch: usize) -> Vec<TimeProcessResult>
where Self: Sync,

Batch-sample sequences from the model.

Auto Trait Implementations§

§

impl<T, K> Freeze for Hawkes<T, K>
where T: Freeze, K: Freeze,

§

impl<T, K> RefUnwindSafe for Hawkes<T, K>

§

impl<T, K> Send for Hawkes<T, K>
where T: Send, K: Send,

§

impl<T, K> Sync for Hawkes<T, K>
where T: Sync, K: Sync,

§

impl<T, K> Unpin for Hawkes<T, K>
where T: Unpin, K: Unpin,

§

impl<T, K> UnwindSafe for Hawkes<T, K>
where T: UnwindSafe, K: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V