Skip to content

Commit

Permalink
note for todo
Browse files Browse the repository at this point in the history
  • Loading branch information
flaxter committed Aug 2, 2017
1 parent 04ab609 commit 55414e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hawkes-model.stan
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ transformed parameters {
vector[n] ll;
real lp;
ll <- mu0 + muST * mu;
for(i in 2:n) {
for(i in 2:n) { // todo: vectorize these calculations
for(j in 1:(i-1)) {
ll[i] <- ll[i] + (a * lengthscaleT * exp(timeD[i,j] * lengthscaleT) * gaussian(spaceD[i,j],lengthscaleS));
}
Expand All @@ -62,3 +62,5 @@ generated quantities {
lengthscale_minutes <- 24*60/lengthscaleT;
background <- (mu0 + muST *mu ) ./ ll;
}


0 comments on commit 55414e8

Please sign in to comment.