12 #ifndef MLPACK_METHODS_DECISION_TREE_BEST_BINARY_NUMERIC_SPLIT_HPP 13 #define MLPACK_METHODS_DECISION_TREE_BEST_BINARY_NUMERIC_SPLIT_HPP 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,
110 template<
bool UseWeights,
typename VecType,
typename ResponsesType,
111 typename WeightVecType>
112 static typename std::enable_if<
116 const double bestGain,
118 const ResponsesType& responses,
119 const WeightVecType& weights,
120 const size_t minimumLeafSize,
121 const double minimumGainSplit,
124 FitnessFunction& fitnessFunction);
147 template<
bool UseWeights,
typename VecType,
typename ResponsesType,
148 typename WeightVecType>
149 static typename std::enable_if<
153 const double bestGain,
155 const ResponsesType& responses,
156 const WeightVecType& weights,
157 const size_t minimumLeafSize,
158 const double minimumGainSplit,
161 FitnessFunction& fitnessFunction);
179 template<
typename ElemType>
180 static size_t CalculateDirection(
181 const ElemType& point,
182 const double& splitInfo,
190 #include "best_binary_numeric_split_impl.hpp"
The BestBinaryNumericSplit is a splitting function for decision trees that will exhaustively search a...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
HAS_MEM_FUNC(BinaryGains, HasBinaryGains)
static size_t NumChildren(const double &, const AuxiliarySplitInfo &)
Returns 2, since the binary split always has two children.