cboettig / nonparametric-bayes

:notebook: Non-parametric Bayesian Inference for Conservation Decisions
http://carlboettiger.info/projects/nonparametric-bayes.html
Creative Commons Zero v1.0 Universal
43 stars 12 forks source link

speeding up Cholesky method with chol2inv? #52

Open davharris opened 9 years ago

davharris commented 9 years ago

Hi Carl, hope you're having a great quarter. I was looking into some GP stuff for my own research and stumbled on the chol2inv function in base R. I haven't played with it yet, but it seems like it could be useful for speeding up some of the computations in the Cholesky method.

I'm probably going to keep poking at this in the coming weeks/months, and I'll let you know if I find anything out, but I thought I'd put it on your radar in the mean time.

cboettig commented 9 years ago

@davharris Thanks for the heads up. Do you think it would be worth implementing a more robust / general purpose R package to provide these GP functions? If so, would you be interested in collaborating on it?

I haven't looked at what else is out there for R recently, but as this particular repo is tied up with this particular project (paper finally out btw, maybe you've seen already: http://dx.doi.org/10.1098/rspb.2014.1631) it seems it might be better to start clean (adding better tests & documentation).

davharris commented 9 years ago

I'm not really sure what's out there in terms of R GP packages, but I know that @goldingn has been thinking about writing a package for a while.

My needs have often been specialized enough that I need to write my own code, but a good GP toolbox could be really useful and I'd be interested in contributing if enough people think it would be worthwhile.

cboettig commented 9 years ago

Well, when I looked back in 2012 there was:

and a function for GP regression in kernlab, along with several 'kriging' in the spatial analysis task view that I didn't look much at (looks like psgp, spatialTools, spTimer, etc. At that time though I found that most of these weren't at all suited to do what I wanted (e.g. be implemented for Bayesian inference of the parameters. iirc, only tgp was already in a Bayesian implementation, but with limited ability to configure and some hard-to-debug memory problems (most of the implementation being in C++).

http://www.carlboettiger.info/2012/10/16/gaussian-processes.html http://www.carlboettiger.info/2012/12/04/tgp-mcmc-for-gaussian-processes.html

So yeah, I hear you regarding writing one's own code, but that's rarely a good long-term solution for standard methods.

Anyway, yup, I think there's quite a few straight-forward ways to improve the speed of the algorithms here. Haven't been particularly rate-limited by the current version on the small problems I've been testing on, so thus far I haven't worried about it. Still, hoping to find time to do some hardening of both the GP and SDP methods here sometime.

goldingn commented 9 years ago

Yup, I have a fellowship interview Thursday. If I get it, writing a flexible new GP toolbox (and formula interface for glm-style fitting) for R will be a big part of my next 4 years. On 20 Jan 2015 04:43, "Carl Boettiger" notifications@github.com wrote:

Well, when I looked back in 2012 there was:

  • gausspr
  • gptk
  • mlegp
  • tgp

and a function for GP regression in kernlab, along with several 'kriging' in the spatial analysis task view http://cran.r-project.org/web/views/Spatial.html that I didn't look much at (looks like psgp, spatialTools, spTimer, etc. At that time though I found that most of these weren't at all suited to do what I wanted (e.g. be implemented for Bayesian inference of the parameters. iirc, only tgp was already in a Bayesian implementation, but with limited ability to configure and some hard-to-debug memory problems (most of the implementation being in C++).

http://www.carlboettiger.info/2012/10/16/gaussian-processes.html

http://www.carlboettiger.info/2012/12/04/tgp-mcmc-for-gaussian-processes.html

So yeah, I hear you regarding writing one's own code, but that's rarely a good long-term solution for standard methods.

Anyway, yup, I think there's quite a few straight-forward ways to improve the speed of the algorithms here. Haven't been particularly rate-limited by the current version on the small problems I've been testing on, so thus far I haven't worried about it. Still, hoping to find time to do some hardening of both the GP and SDP methods here sometime.

— Reply to this email directly or view it on GitHub https://github.com/cboettig/nonparametric-bayes/issues/52#issuecomment-70603984 .

davharris commented 9 years ago

Nice. Good luck!

goldingn commented 9 years ago

Thanks! On 20 Jan 2015 20:13, "David J. Harris" notifications@github.com wrote:

Nice. Good luck!

— Reply to this email directly or view it on GitHub https://github.com/cboettig/nonparametric-bayes/issues/52#issuecomment-70724144 .