[mlpack-git] master: Fix -Wuninitialized. (0e93455)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 11:46:20 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/de9cc4b05069e1fa4793d9355f2f595af5ff45d2...6070527af14296cd99739de6c62666cc5d2a2125
>---------------------------------------------------------------
commit 0e93455dddbd5b3c052731c1191fe4bc21343275
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Nov 13 07:13:30 2015 -0800
Fix -Wuninitialized.
>---------------------------------------------------------------
0e93455dddbd5b3c052731c1191fe4bc21343275
src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp b/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp
index 5bc1715..ce0164c 100644
--- a/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp
+++ b/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp
@@ -347,8 +347,8 @@ size_t HoeffdingTree<
// Some split procedures can split multiple ways, but we only care about the
// best two splits that can be done in every network.
- double bestGain;
- double secondBestGain;
+ double bestGain = 0.0;
+ double secondBestGain = 0.0;
if (type == data::Datatype::categorical)
categoricalSplits[index].EvaluateFitnessFunction(bestGain,
secondBestGain);
More information about the mlpack-git
mailing list