Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
BART Class Reference

Bayesian Additive Regression Trees. More...

#include <BART.h>

Public Member Functions

void learn (const vector< float > &x, const vector< float > &y)
 learning on x vector which represents matrix.
 
void predict (const vector< float > &x, int nSamples, vector< float > &scores) const
 prediction on x vector which represents matrix
 
 BART (int ntrees, int iterations, int burn_cnt, int restart_cnt, bart_params &tree_pr)
 a simple default ctor
 
void operator= (const BART &other)
 a simple assignment operator to shallow copy all BART model with all trees.
 
 ~BART ()
 a dctor to free all tree memory
 

Data Fields

int ntrees
 The nubmer of trees/restarts.
 
int iter_count
 the number of steps to call next_gen_tree for each tree
 
int burn_count
 the burn count
 
int restart_count
 number of restarts
 
bart_params tree_params
 additional tree parameters
 

Detailed Description

Bayesian Additive Regression Trees.


A Monte-Carlo-Markov-Chain process to create trees based on bayesian assumtions
to reach maximum likelihood of tree based on the observations with Metropolis_Hastings algorithm.
It's very usefull for casual inference:
In 2016 at Atlantic Casual Infernce Confernce - 1st place in data competition

Member Function Documentation

◆ learn()

void BART::learn ( const vector< float > &  x,
const vector< float > &  y 
)

learning on x vector which represents matrix.

y is the labels

Parameters
xa vector which represnts matrix. the data is ordered by observations. we first see first observation all features and than second obseravtion all features...
ylabels vector for each observation in x

◆ operator=()

void BART::operator= ( const BART other)
inline

a simple assignment operator to shallow copy all BART model with all trees.

not allocating new memory for trees. pointing to same objects

◆ predict()

void BART::predict ( const vector< float > &  x,
int  nSamples,
vector< float > &  scores 
) const

prediction on x vector which represents matrix

Parameters
xa vector which represnts matrix. the data is ordered by observations. we first see first observation all features and than second obseravtion all features...
nSamplesthe number of samples in x
Returns

scores the result scores for each observation


The documentation for this class was generated from the following files: