13 #ifndef MLPACK_METHODS_DECISION_TREE_ALL_CATEGORICAL_SPLIT_HPP
14 #define MLPACK_METHODS_DECISION_TREE_ALL_CATEGORICAL_SPLIT_HPP
27 template<
typename FitnessFunction>
32 template<
typename ElemType>
55 template<
typename VecType>
57 const double bestGain,
59 const size_t numCategories,
60 const arma::Row<size_t>& labels,
61 const size_t numClasses,
62 const size_t minimumLeafSize,
63 arma::Col<typename VecType::elem_type>& classProbabilities,
72 template<
typename ElemType>
73 static size_t NumChildren(
const arma::Col<ElemType>& classProbabilities,
82 template<
typename ElemType>
84 const ElemType& point,
85 const arma::Col<ElemType>& classProbabilities,
93 #include "all_categorical_split_impl.hpp"
static size_t NumChildren(const arma::Col< ElemType > &classProbabilities, const AuxiliarySplitInfo< ElemType > &)
Return the number of children in the split.
The core includes that mlpack expects; standard C++ includes and Armadillo.
static double SplitIfBetter(const double bestGain, const VecType &data, const size_t numCategories, const arma::Row< size_t > &labels, const size_t numClasses, const size_t minimumLeafSize, arma::Col< typename VecType::elem_type > &classProbabilities, AuxiliarySplitInfo< typename VecType::elem_type > &aux)
Check if we can split a node.
The AllCategoricalSplit is a splitting function that will split categorical features into many childr...
static size_t CalculateDirection(const ElemType &point, const arma::Col< ElemType > &classProbabilities, const AuxiliarySplitInfo< ElemType > &)
Calculate the direction a point should percolate to.