StochTree 0.0.1
Loading...
Searching...
No Matches
stochtree C++ Documentation

Getting Started

stochtree can be built and run as a standalone C++ program directly from source using cmake:

Cloning the Repository

To clone the repository, you must have git installed, which you can do following these instructions.

Once git is available at the command line, navigate to the folder that will store this project (in bash / zsh, this is done by running cd followed by the path to the directory). Then, clone the stochtree repo as a subfolder by running

git clone --recursive https://github.com/StochasticTree/stochtree.git

NOTE: this project incorporates several dependencies as git submodules, which is why the --recursive flag is necessary (some systems may perform a recursive clone without this flag, but --recursive ensures this behavior on all platforms). If you have already cloned the repo without the --recursive flag, you can retrieve the submodules recursively by running git submodule update --init --recursive in the main repo directory.

Key Components

The stochtree C++ core consists of thousands of lines of C++ code, but it can organized and understood through several components (see topics for more detail):

  • Trees: the most important "primitive" of decision tree algorithms is the decision tree itself, which in stochtree is defined by a Tree class as well as a series of static helper functions for prediction.
  • Forest: individual trees are combined into a forest, or ensemble, which in stochtree is defined by the TreeEnsemble class and a container of forests is defined by the ForestContainer class.
  • Dataset: data can be loaded from a variety of sources into a stochtree data layer.
  • Sampler: helper functions that sample forests from training data comprise the sampling layer of stochtree.

Extending <tt>stochtree</tt>