plot.mcmc | R Documentation |
plot.mcmc() takes your BART model and your landscape, and shows each individual sum-of-trees model's predictions on the landscape, next to the accumulating posterior mean. If you start with a low number of trees (n = 5 to 20) and drop the BART burn-in (include the first few samples), you can watch the model learn in realtime, which is often very interesting. This can be a little slow, and you might want to adjust some of the settings for that reason.
plot.mcmc(object, inputstack, iter = 100, wait = 0.1, quiet = FALSE)
object |
A BART model object generated by the dbarts package |
inputstack |
An object of class RasterStack |
iter |
How many of the first 1:n draws do you want to visualize? |
wait |
Adds a Sys.sleep after the plots; because the plots are two-panel they can be a little delayed sometimes, which isn't super visually smooth. However, if you want something that's particularly crisp, I'd suggest using the animation package (see below example). |
quiet |
Turns off progress bars if TRUE |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.