bark: Bayesian Additive Regression Kernels
The bark package implements estimation for a Bayesian nonparametric regression model represented as a sum of multivariate Gaussian kernels as a flexible model to capture nonlinearities, interactions and feature selection.
Installation
You can install the released version of bark
from CRAN with:
install.packages("bark")And the development version from GitHub with:
require("devtools") devtools::install_github("merliseclyde/bark")
(verify that the branch has a passing R CMD check badge above)
Example
library(bark) set.seed(42) traindata <- sim_Friedman2(200, sd=125) testdata <- sim_Friedman2(1000, sd=0) fit.bark.d <- bark(y ~ ., data=data.frame(traindata), testdata = data.frame(testdata), classification=FALSE, selection = TRUE, common_lambdas = FALSE, printevery = 10^10) mean((fit.bark.d$yhat.test.mean-testdata$y)^2) #> [1] 1920.283
bark is similar to SVM, however it allows different kernel smoothing parameters for every dimension of the inputs