DecisionTreeBase class
#include <DecisionTreeBase.h>
DecisionTreeBase is a semi-virtual parent class that contains methods used in both DecisionTreeClassifier and DecisionTreeRegressor.
Contents
Derived classes
- class DecisionTreeClassifier
Constructors, destructors, conversion operators
- DecisionTreeBase(std::string lossCriterion, double maxFeatures, int minSamplesSplit, int maxDepth, int minSamplesLeaf, double minImpurityDecrease)
- Construct a new DecisionTreeBase object.
Public functions
Protected variables
Private functions
- auto computeLoss(std::vector<double>) -> double pure virtual
- auto getTruthVector(DataFrame*) -> std::vector<double> pure virtual
- void printTruthVector(std::vector<double> truthVector) pure virtual
Function documentation
DecisionTreeBase:: DecisionTreeBase(std::string lossCriterion,
double maxFeatures,
int minSamplesSplit,
int maxDepth,
int minSamplesLeaf,
double minImpurityDecrease)
Construct a new DecisionTreeBase object.
Parameters | |
---|---|
lossCriterion | type of loss calculation used |
maxFeatures | number of features used for splitting a node |
minSamplesSplit | minimun number of samples at root to consider splitting |
maxDepth | maxiumum depth of the decision tree |
minSamplesLeaf | minimum number of samples in child leafs to consider the split |
minImpurityDecrease | minimum improvement in loss calculation to consider the split |