12 #ifndef MLPACK_METHODS_DECISION_TREE_BEST_BINARY_NUMERIC_SPLIT_HPP 13 #define MLPACK_METHODS_DECISION_TREE_BEST_BINARY_NUMERIC_SPLIT_HPP 26 template<
typename FitnessFunction>
31 template<
typename ElemType>
53 template<
bool UseWeights,
typename VecType,
typename WeightVecType>
55 const double bestGain,
57 const arma::Row<size_t>& labels,
58 const size_t numClasses,
59 const WeightVecType& weights,
60 const size_t minimumLeafSize,
61 const double minimumGainSplit,
62 arma::Col<typename VecType::elem_type>& classProbabilities,
68 template<
typename ElemType>
82 template<
typename ElemType>
84 const ElemType& point,
85 const arma::Col<ElemType>& classProbabilities,
93 #include "best_binary_numeric_split_impl.hpp" static double SplitIfBetter(const double bestGain, const VecType &data, const arma::Row< size_t > &labels, const size_t numClasses, const WeightVecType &weights, const size_t minimumLeafSize, const double minimumGainSplit, arma::Col< typename VecType::elem_type > &classProbabilities, AuxiliarySplitInfo< typename VecType::elem_type > &aux)
Check if we can split a node.
The BestBinaryNumericSplit is a splitting function for decision trees that will exhaustively search a...
The core includes that mlpack expects; standard C++ includes and Armadillo.
static size_t CalculateDirection(const ElemType &point, const arma::Col< ElemType > &classProbabilities, const AuxiliarySplitInfo< ElemType > &)
Given a point, calculate which child it should go to (left or right).
static size_t NumChildren(const arma::Col< ElemType > &, const AuxiliarySplitInfo< ElemType > &)
Returns 2, since the binary split always has two children.