
Nonparametric Poisson regression with a Gaussian process prior
Source:R/gh_c2_10.R
Ghosalnppoissonreg.RdY | x ~ Poisson(exp f(x)) with f ~ GP. The log link keeps the intensity positive without constraining f, and as in the binary case the price is the loss of conjugacy, so the posterior mode is found by damped Newton on the log-posterior.
Details
Formula: solve (K^(-1) + diag(lambda)) df = (y - lambda) - K^(-1) f and step by df/2, with lambda = exp(min(f, 30)).
References
Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 2.6.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ghosalnppoissonreg(V, V)
#> $estimate
#> [1] 3.789453
#>
#> $intensity
#> [1] 1.065621 1.666354 2.476025 3.307161 4.188774 5.036555 6.102965 6.472169
#>
#> $f
#> [1] 0.06355737 0.51063775 0.90665441 1.19609002 1.43240800 1.61672238 1.80877467
#> [8] 1.86751134
#>
#> $method
#> [1] "log-link GP Poisson regression MAP (GvdV 2017 sec. 2.6)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"