mlpack
|
The MAD (Mean absolute deviation) gain, is a measure of set purity based on the deviation of dependent values present in the node. More...
#include <mad_gain.hpp>
Static Public Member Functions | |
template<bool UseWeights, typename VecType , typename WeightVecType > | |
static double | Evaluate (const VecType &values, const WeightVecType &weights, const size_t begin, const size_t end) |
Evaluate the mean absolute deviation gain from begin to end index. More... | |
template<bool UseWeights, typename VecType , typename WeightVecType > | |
static double | Evaluate (const VecType &values, const WeightVecType &weights) |
Evaluate the MAD gain on the complete vector. More... | |
The MAD (Mean absolute deviation) gain, is a measure of set purity based on the deviation of dependent values present in the node.
This is same thing as negation of deviation of dependent variable from the mean in the node as we will try to maximize this quantity to maximize gain (and thus reduce absolute deviation of a set).
|
inlinestatic |
Evaluate the mean absolute deviation gain from begin to end index.
Note that gain can be slightly greater than 0 due to floating-point representation issues. Thus if you are checking for perfect fit, be sure to use 'gain >= 0.0'. Not 'gain == 0.0'. The values should always be of type arma::Row<double> or arma::rowvec.
values | Set of values to evaluate MAD gain on. |
weights | Weights associated to each value. |
begin | Start index. |
end | End index. |
|
inlinestatic |
Evaluate the MAD gain on the complete vector.
values | Set of values to evaluate MAD gain on. |
weights | Weights associated to each value. |