Go to the source code of this file.
Functions | |
template < typename VecType > | |
void | Sum (const VecType &values, const size_t begin, const size_t end, double &mean) |
Sums up the labels vector. More... | |
template < typename VecType , typename WeightVecType > | |
void | WeightedSum (const VecType &values, const WeightVecType &weights, const size_t begin, const size_t end, double &accWeights, double &weightedMean) |
Calculates the weighted sum and total weight of labels. More... | |
Various utility functions used in decision tree implementation.
mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.
Definition in file utils.hpp.
|
inline |
Sums up the labels vector.
Definition at line 96 of file utils.hpp.
Referenced by MSEGain::Evaluate(), MADGain::Evaluate(), MSEGain::OutputLeafValue(), and MADGain::OutputLeafValue().
|
inline |
Calculates the weighted sum and total weight of labels.
Definition at line 19 of file utils.hpp.
Referenced by MSEGain::Evaluate(), MADGain::Evaluate(), MSEGain::OutputLeafValue(), and MADGain::OutputLeafValue().