Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gstechschulte/bart-rs
Particle Gibbs sampler for Bayesian additive regression trees (BART).
https://github.com/gstechschulte/bart-rs
Last synced: 24 days ago
JSON representation
Particle Gibbs sampler for Bayesian additive regression trees (BART).
- Host: GitHub
- URL: https://github.com/gstechschulte/bart-rs
- Owner: GStechschulte
- Created: 2024-07-14T05:52:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-16T19:09:33.000Z (about 2 months ago)
- Last Synced: 2024-09-17T00:15:29.440Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bart-rs
Rust implementation of [PyMC-BART](https://github.com/pymc-devs/pymc-bart).
## Usage
...
## Modifications
The core Particle Gibbs (PG) sampling algorithm for Bayesian Additive Regression Trees (BART) remains the same
in this Rust implementation. What differs is the choice of data structure to represent the Binary Decision Tree.A `DecisionTree` structure is implemented as a number of parallel vectors. The i-th element of each vector holds
information about node `i`. Node 0 is the tree's root. Some of the arrays only apply to either leaves or split
nodes. In this case, the values of the nodes of the other vector is arbitrary. For example, `feature` and `threshold`
vectors only apply to split nodes. The values for leaf nodes in these arrays are therefore arbitrary.## Design
In this section, the architecture of `bart-rs` is given.
### Traits
Traits, together with generics, are the bread and butter of Rust programming. Traits allow you to define shared functionality for Rust types.
### Errors
Rust groups errors into two main categories: (1) recoverable, and (2) non-recoverable. For errors that are recoverable, we most likely
want to report the problem to the user and retry the operation. Unrecoverable errors are always symptoms of bugs such as trying to access
a location beyond the end of an array.In `bart-rs` if a function or method can fail, it will have a return type `Result`. The Result type indicates
possible failure.