[mlpack] 52/207: Fix bug: it was right the first time.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Thu Mar 23 17:53:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit d0a5f54a691e4bff8d09d62b60ef0c72cf378140
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Jan 23 17:28:08 2017 -0500
Fix bug: it was right the first time.
---
src/mlpack/methods/decision_tree/best_binary_numeric_split_impl.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 b7d8e9a..720af4b 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
@@ -49,8 +49,8 @@ double BestBinaryNumericSplit<FitnessFunction>::SplitIfBetter(
index, sortedLabels.n_elem - 1), numClasses);
// Calculate the fraction of points in the left and right children.
- const double rightRatio = double(index) / double(sortedLabels.n_elem);
- const double leftRatio = 1.0 - rightRatio;
+ const double leftRatio = double(index) / double(sortedLabels.n_elem);
+ const double rightRatio = 1.0 - leftRatio;
// Calculate the gain at this split point.
const double gain = leftRatio * leftGain + rightRatio * rightGain;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list