12 #ifndef MLPACK_METHODS_DECISION_TREE_BEST_BINARY_NUMERIC_SPLIT_HPP 13 #define MLPACK_METHODS_DECISION_TREE_BEST_BINARY_NUMERIC_SPLIT_HPP 25 HAS_MEM_FUNC(BinaryGains, HasBinaryGains);
35 template<
typename T,
bool >
38 const static bool value = HasBinaryGains<T,
39 std::tuple<double, double>(T::*)()>::value;
48 template<
typename FitnessFunction>
76 template<
bool UseWeights,
typename VecType,
typename WeightVecType>
77 static double SplitIfBetter(
78 const double bestGain,
80 const arma::Row<size_t>& labels,
81 const size_t numClasses,
82 const WeightVecType& weights,
83 const size_t minimumLeafSize,
84 const double minimumGainSplit,
108 template<
bool UseWeights,
typename VecType,
typename ResponsesType,
109 typename WeightVecType>
110 static typename std::enable_if<
114 const double bestGain,
116 const ResponsesType& responses,
117 const WeightVecType& weights,
118 const size_t minimumLeafSize,
119 const double minimumGainSplit,
144 template<
bool UseWeights,
typename VecType,
typename ResponsesType,
145 typename WeightVecType>
146 static typename std::enable_if<
150 const double bestGain,
152 const ResponsesType& responses,
153 const WeightVecType& weights,
154 const size_t minimumLeafSize,
155 const double minimumGainSplit,
175 template<
typename ElemType>
176 static size_t CalculateDirection(
177 const ElemType& point,
178 const double& splitInfo,
The BestBinaryNumericSplit is a splitting function for decision trees that will exhaustively search a...
Definition: best_binary_numeric_split.hpp:49
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
static size_t NumChildren(const double &, const AuxiliarySplitInfo &)
Returns 2, since the binary split always has two children.
Definition: best_binary_numeric_split.hpp:162
Definition: best_binary_numeric_split.hpp:53