Skip to content

Commit

Permalink
Docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
dm13450 committed Feb 10, 2021
1 parent 50e2e11 commit 5b3d6f8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ intensity = HawkesProcesses.intensity(ts, simevents, bg, kappa, kernel)

* Likelihood with functional background
* Generic Bayesian inference.

## Blog Posts

* [HawkesProcesses.jl: An Introduction](http://dm13450.github.io/2020/05/26/HawkesProcessesPackage.html)
* [Hawkes Processes and DIC](http://dm13450.github.io/2020/08/26/Hawkes-and-DIC.html)
23 changes: 20 additions & 3 deletions docs/src/inference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This package was designed to provide an implementation of an efficient Bayesian sampling algorithm but using the availabel functions you can also use frequentist methods.
This package was designed to provide an implementation of an efficient Bayesian sampling algorithm but using the available functions you can also use frequentist methods.

### Bayesian Inference

Expand All @@ -16,9 +16,26 @@ simEvents = HawkesProcesses.simulate(bg, kappa, kernF, maxT)
bgSamples, kappaSamples, kernSamples = HawkesProcesses.fit(simEvents, maxT, 1000)
```

Here we now have MCMC chains for the three different parameters.
Here we now have MCMC chains for the three different parameters.

At the minute, only the exponential distribution for the kernel is implemented.
In future releases this will be changed to be generic for any kernel you specify.


### Frequentist Inference

TBC
Another (and potentially quicker) method of infering the parameters is to maximise the likelihood function.

```@example
using Optim
opt = optimize(x-> -1*HawkesProcesses.likelihood(simEvents,
x[1],
x[2],
Distriubtions.Exponential(x[3]),
maxT),
rand(3))
Optim.minimizer(opt)
```

Simply passing the likelihood function through to the optimiser allows for a quick and easy estimate of the parameters.
4 changes: 3 additions & 1 deletion docs/src/modelchecking.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Then by looking at what likelihood is larger can suggest which model is better s

## Residuals

TBC

## Probability Calibration

## Probability Calibration
TBC
2 changes: 1 addition & 1 deletion docs/src/simulating.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

You can simulate a Hawkes process easily using the `simulate` function. Both constant and functional background rates are currently supported.

To simulate from a Hawkes process we first generate the background events from a Poisson process with the background rate. Then for each event generated from the background we simulate a inhomogenous Poisson process with rate kappa*g(t-t_parent), any further events that arise are then also used to simulate further events.
To simulate from a Hawkes process we first generate the background events from a Poisson process with the background rate. Then for each event generated from the background we simulate a inhomogeneous Poisson process with rate kappa*g(t-t_parent), any further events that arise are then also used to simulate further events.

### Constant Background

Expand Down

0 comments on commit 5b3d6f8

Please sign in to comment.