8 #ifndef MLPACK_METHODS_DECISION_TREE_ALL_CATEGORICAL_SPLIT_HPP 9 #define MLPACK_METHODS_DECISION_TREE_ALL_CATEGORICAL_SPLIT_HPP 22 template<
typename FitnessFunction>
27 template<
typename ElemType>
50 template<
typename VecType>
52 const double bestGain,
54 const size_t numCategories,
55 const arma::Row<size_t>& labels,
56 const size_t numClasses,
57 const size_t minimumLeafSize,
58 arma::Col<typename VecType::elem_type>& classProbabilities,
67 template<
typename ElemType>
68 static size_t NumChildren(
const arma::Col<ElemType>& classProbabilities,
77 template<
typename ElemType>
79 const ElemType& point,
80 const arma::Col<ElemType>& classProbabilities,
88 #include "all_categorical_split_impl.hpp" 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.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
static size_t NumChildren(const arma::Col< ElemType > &classProbabilities, const AuxiliarySplitInfo< ElemType > &)
Return the number of children in the split.
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.