bark

bark R package for Bayesian nonparametric kernel regression

https://github.com/merliseclyde/bark

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 3 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords

bayesian classification cran-r levy-processes nonparametric-regression prediction regression
Last synced: 6 months ago · JSON representation

Repository

bark R package for Bayesian nonparametric kernel regression

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
bayesian classification cran-r levy-processes nonparametric-regression prediction regression
Created over 1 year ago · Last pushed over 1 year ago

https://github.com/merliseclyde/bark/blob/main/



# bark: Bayesian Additive Regression Kernels



[![R-CMD-check](https://github.com/merliseclyde/bark/workflows/R-CMD-check/badge.svg)](https://github.com/merliseclyde/bark/actions)
[![codecov](https://codecov.io/github/merliseclyde/bark/graph/badge.svg?token=M9zXaLUqHe)](https://codecov.io/github/merliseclyde/bark)
[![OpenSSF Best
Practices](https://bestpractices.coreinfrastructure.org/projects/7096/badge)](https://bestpractices.coreinfrastructure.org/projects/7096)
[![CRAN
status](https://www.r-pkg.org/badges/version/bark)](https://CRAN.R-project.org/package=bark)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13894258.svg)](https://doi.org/10.5281/zenodo.13894258)


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
[![](https://www.r-pkg.org/badges/version/bark)](https://cran.r-project.org/package=bark)
from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("bark")
```

And the development version from
[GitHub](https://github.com/merliseclyde/bark) with:

``` r
require("devtools")
devtools::install_github("merliseclyde/bark")
```

(verify that the branch has a passing R CMD check badge above)

## Example

``` r
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 $x$ as well as selection of
inputs by allowing the kernel smoothing parameters to be zero.

The plot below shows posterior draws of the $\lambda$ for the simulated
data.

``` r
boxplot(as.data.frame(fit.bark.d$theta.lambda))
```



The posterior distribution for $\lambda_1$ and $\lambda_4$ are
concentrated near zero, which leads to $x_1$ and $x_2$ dropping from the
mean function.

## Roadmap for Future Enhancements

Over the next year the following enhancements are planned:

- port more of the R code to C/C++ for improvements in speed

- add S3 methods for `predict`, `summary`, `plot`

- add additional kernels and LARK methods from AOS (2011) paper

- better hyperparameter specification

If there are features you would like to see added, please feel free to
create an [issue in GitHub](https://github.com/merliseclyde/bark/issues)
and we can discuss!

Owner

  • Name: Merlise Clyde
  • Login: merliseclyde
  • Kind: user
  • Location: Durham, NC
  • Company: Duke University

Professor of Statistical Science, Duke University.

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 122
  • Total Committers: 3
  • Avg Commits per committer: 40.667
  • Development Distribution Score (DDS): 0.025
Past Year
  • Commits: 73
  • Committers: 2
  • Avg Commits per committer: 36.5
  • Development Distribution Score (DDS): 0.027
Top Committers
Name Email Commits
Merlise Clyde c****e@s****u 119
Merlise Clyde c****e@d****u 2
Zhi Ouyang z****2@s****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 9
  • Total pull requests: 0
  • Average time to close issues: 12 months
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.44
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: about 4 hours
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • merliseclyde (9)
Pull Request Authors
Top Labels
Issue Labels
enhancement (5) bug (2) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 260 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: bark

Bayesian Additive Regression Kernels

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 260 Last month
Rankings
Stargazers count: 28.5%
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 30.9%
Downloads: 32.0%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: 6 months ago