[R] Example for multivariate hawkes distribution

Ramkishore Swaminathan ramkishore31 at gmail.com
Thu Jul 28 07:37:45 CEST 2016


Hi,

I have a list of N categories that a user can click on. Lets say there are
K such users totally. I have the past 3 months data which tells which user
has clicked on which category on which date for how many times. For ex -
{20th June 2016 : [10,15,12,15]} this dict is for a particular user and
says on 20th June he clicked on categories 10,12 once and 15 twice.

Given this data, I want to use a Multivariate Hawkes distribution to model
this, so that I can predict which categories a user will click on based on
the past categories(same and different categories) that have been clicked.

I have already looked at a number of examples.
http://jheusser.github.io/2013/09/08/hawkes.html uses a univariate Hawkes
distribution using ptproc package. ptproc however, doesn't exist now(not
able to install it in R studio).

Using the hawkes package,

lambda0<-c(0.2,0.2)
alpha<-matrix(c(0.5,0,0,0.5),byrow=TRUE,nrow=2)
beta<-c(0.7,0.7)
history<-simulateHawkes(lambda0,alpha,beta,3600)
l<-likelihoodHawkes(lambda0,alpha,beta,history)

This computes the likelihood for some random initialization of parameters.
How do I find the best parameters by using EM algorithm that maximizes
likelihood here for Multivariate Hawkes distribution ?

I want to feed some random initialization of the mean, alpha and beta
parameters and want the model to perform Maximum Likelihood estimation
using EM algorithm for Multivariate Hawkes distribution to find the best
values of parameters and return it.

Can you explain how its done using which package with an example?

Any help is appreciated!
Thanks!

Ramkishore

	[[alternative HTML version deleted]]



More information about the R-help mailing list