diff --git a/src/mlpack/methods/decision_tree/best_binary_numeric_split.hpp b/src/mlpack/methods/decision_tree/best_binary_numeric_split.hpp index 3f5cd27e65..6114b7e1b9 100644 --- a/src/mlpack/methods/decision_tree/best_binary_numeric_split.hpp +++ b/src/mlpack/methods/decision_tree/best_binary_numeric_split.hpp @@ -101,7 +101,15 @@ class BestBinaryNumericSplit */ template - static double SplitIfBetter( + static typename std::enable_if< + !HasBinaryScanInitialize::value && + !HasBinaryStep::value && + !HasBinaryGains(FitnessFunction::*)(void)>::value, + double>::type + SplitIfBetter( const double bestGain, const VecType& data, const ResponsesType& responses, @@ -134,13 +142,13 @@ class BestBinaryNumericSplit */ template - typename std::enable_if< + static typename std::enable_if< HasBinaryScanInitialize::value && HasBinaryStep::value && HasBinaryGains(FitnessFunction::*)()>::value, + std::tuple(FitnessFunction::*)(void)>::value, double>::type SplitIfBetter( const double bestGain, diff --git a/src/mlpack/methods/decision_tree/best_binary_numeric_split_impl.hpp b/src/mlpack/methods/decision_tree/best_binary_numeric_split_impl.hpp index 3d0ebdc078..76fb90df95 100644 --- a/src/mlpack/methods/decision_tree/best_binary_numeric_split_impl.hpp +++ b/src/mlpack/methods/decision_tree/best_binary_numeric_split_impl.hpp @@ -189,7 +189,15 @@ double BestBinaryNumericSplit::SplitIfBetter( template template -double BestBinaryNumericSplit::SplitIfBetter( +typename std::enable_if< + !HasBinaryScanInitialize::value && + !HasBinaryStep::value && + !HasBinaryGains(FitnessFunction::*)(void)>::value, + double>::type +BestBinaryNumericSplit::SplitIfBetter( const double bestGain, const VecType& data, const ResponsesType& responses, @@ -329,7 +337,7 @@ typename std::enable_if< HasBinaryStep::value && HasBinaryGains(FitnessFunction::*)()>::value, + std::tuple(FitnessFunction::*)(void)>::value, double>::type BestBinaryNumericSplit::SplitIfBetter( const double bestGain,