The MAD (Mean absolute deviation) gain, is a measure of set purity based on the deviation of dependent values present in the node. More...
Public Member Functions | |
template<bool UseWeights, typename ResponsesType , typename WeightsType > | |
double | OutputLeafValue (const ResponsesType &responses, const WeightsType &weights) |
Returns the output value for each leaf node for prediction. More... | |
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).
Definition at line 30 of file mad_gain.hpp.
|
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. |
Definition at line 46 of file mad_gain.hpp.
References Sum(), and WeightedSum().
|
inlinestatic |
Evaluate the MAD gain on the complete vector.
values | Set of values to evaluate MAD gain on. |
weights | Weights associated to each value. |
Definition at line 92 of file mad_gain.hpp.
|
inline |
Returns the output value for each leaf node for prediction.
The output value is calculated as the average of all the points in that leaf node. This calculation is specific to regression trees only.
Definition at line 108 of file mad_gain.hpp.
References Sum(), and WeightedSum().