forpy
2
|
Interface for a gain calculator class. More...
#include <igaincalculator.h>
Public Member Functions | |
virtual | ~IGainCalculator () |
virtual float | operator() (const std::vector< float > &members_numbers_left, const std::vector< float > &members_numbers_right) VIRTUAL(float) |
virtual float | operator() (const float ¤t_entropy, const std::vector< float > &members_numbers_left, const std::vector< float > &members_numbers_right) VIRTUAL(float) |
virtual float | approx (const std::vector< float > &members_numbers_left, const std::vector< float > &members_numbers_right) VIRTUAL(float) |
virtual bool | operator== (const IGainCalculator &rhs) const VIRTUAL(bool) |
Protected Member Functions | |
IGainCalculator () | |
Private Member Functions | |
DISALLOW_COPY_AND_ASSIGN (IGainCalculator) | |
template<class Archive > | |
void | serialize (Archive &, const uint &) |
Friends | |
class | cereal::access |
Interface for a gain calculator class.
A gain calculator must have an overloaded () operator with the according parameters and an approx function that returns a fast approximation of the gain (can return the original gain if no approximation is available). The approximation is used to find the best split position and only for that the actual gain is computed.
counting_dtype | The datatype for counting class members. This might be a float if sample weights are used. |
Definition at line 29 of file igaincalculator.h.
|
inlinevirtual |
Definition at line 31 of file igaincalculator.h.
|
inlineprotected |
Definition at line 57 of file igaincalculator.h.
|
virtual |
Calculates an approximation for the gain of the two subsets that can be used inside an argmax
function.
Reimplemented in forpy::EntropyGain.
|
private |
|
virtual |
Calculates the exact gain for the two subsets.
Reimplemented in forpy::EntropyGain.
|
virtual |
Calculates the exact gain for the two subsets and uses the provided current_entropy
.
Reimplemented in forpy::EntropyGain.
|
virtual |
Deep equality comparison.
Reimplemented in forpy::EntropyGain.
|
inlineprivate |
Definition at line 64 of file igaincalculator.h.
|
friend |
Definition at line 62 of file igaincalculator.h.