13 #ifndef MLPACK_METHODS_DECISION_TREE_ALL_CATEGORICAL_SPLIT_HPP 14 #define MLPACK_METHODS_DECISION_TREE_ALL_CATEGORICAL_SPLIT_HPP 29 template<
typename FitnessFunction>
59 template<
bool UseWeights,
typename VecType,
typename LabelsType,
60 typename WeightVecType>
62 const double bestGain,
64 const size_t numCategories,
65 const LabelsType& labels,
66 const size_t numClasses,
67 const WeightVecType& weights,
68 const size_t minimumLeafSize,
69 const double minimumGainSplit,
97 template<
bool UseWeights,
typename VecType,
typename ResponsesType,
98 typename WeightVecType>
100 const double bestGain,
102 const size_t numCategories,
103 const ResponsesType& responses,
104 const WeightVecType& weights,
105 const size_t minimumLeafSize,
106 const double minimumGainSplit,
109 FitnessFunction& fitnessFunction);
127 template<
typename ElemType>
129 const ElemType& point,
130 const double& splitInfo,
138 #include "all_categorical_split_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
The AllCategoricalSplit is a splitting function that will split categorical features into many childr...
static size_t CalculateDirection(const ElemType &point, const double &splitInfo, const AuxiliarySplitInfo &)
Calculate the direction a point should percolate to.
static size_t NumChildren(const double &splitInfo, const AuxiliarySplitInfo &)
Return the number of children in the split.
static double SplitIfBetter(const double bestGain, const VecType &data, const size_t numCategories, const LabelsType &labels, const size_t numClasses, const WeightVecType &weights, const size_t minimumLeafSize, const double minimumGainSplit, arma::vec &splitInfo, AuxiliarySplitInfo &aux)
Check if we can split a node.