StochTree 0.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StochTree::TreeSplit Class Reference

Representation of arbitrary tree split rules, including numeric split rules (X[,i] <= c) and categorical split rules (X[,i] in {2,4,6,7}) More...

#include <tree.h>

Public Member Functions

 TreeSplit (double split_value)
 Construct a numeric TreeSplit.
 
 TreeSplit (std::vector< std::uint32_t > &split_categories)
 Construct a categorical TreeSplit.
 
bool NumericSplit ()
 Whether or not a TreeSplit rule is numeric.
 
bool SplitTrue (double fvalue)
 Whether a given covariate value is True or False on the rule defined by a TreeSplit object.
 
double SplitValue ()
 Numeric cutoff value defining a TreeSplit object.
 
std::vector< std::uint32_t > SplitCategories ()
 Categories defining a TreeSplit object.
 

Detailed Description

Representation of arbitrary tree split rules, including numeric split rules (X[,i] <= c) and categorical split rules (X[,i] in {2,4,6,7})

Constructor & Destructor Documentation

◆ TreeSplit() [1/2]

StochTree::TreeSplit::TreeSplit ( double  split_value)
inline

Construct a numeric TreeSplit.

Parameters
split_valueNumeric cutoff defining a new split rule

◆ TreeSplit() [2/2]

StochTree::TreeSplit::TreeSplit ( std::vector< std::uint32_t > &  split_categories)
inline

Construct a categorical TreeSplit.

Parameters
split_categoriesVector of category indices defining a new (unordered) categorical split rule

Member Function Documentation

◆ SplitTrue()

bool StochTree::TreeSplit::SplitTrue ( double  fvalue)
inline

Whether a given covariate value is True or False on the rule defined by a TreeSplit object.

Parameters
fvalueValue of the covariate

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