Code for Bayesian Additive Regression Spanning Trees, a tool for nonparametric regression on complex constrained domains.
Reference:
BASTDemo.R: Demonstration code of BAST
AralSea.R: Preprocessing chlorophyll data in Aral Sea for demonstration purposes, following Niu et al. (2019)
BASTFun.R: Implementation and API documentations for main functions of BAST
ComplexDomainFun.R: Utility functions for complex constrained domains
FEMFun.R: Utility functions for triangular meshes, modified from R package fdaPDE
aral_data.RData: Preprocessed data from AralSea.R
The code depends on the following R packages: igraph, fields, FNN, mgcv, fdaPDE, gamair.
Please make sure they are installed before running the demo code.
A more efficient version using Rcpp is under active development.