faif
|
#include <Classifier.hpp>
Public Types | |
typedef Classifier< Val >::AttrDomain | AttrDomain |
typedef Classifier< Val >::Domains | Domains |
typedef Classifier< Val >::AttrIdd | AttrIdd |
typedef Classifier< Val >::Beliefs | Beliefs |
typedef Classifier< Val >::ExampleTrain | ExampleTrain |
typedef Classifier< Val >::ExamplesTrain | ExamplesTrain |
typedef std::map< AttrIdd, int > | Counters |
Public Member Functions | |
TrainExampleCategoryCounters () | |
c-tor, empty counters More... | |
TrainExampleCategoryCounters (typename ExamplesTrain::const_iterator beg, typename ExamplesTrain::const_iterator end) | |
c-tor, counters initialized by train examples collection More... | |
void | inc (const ExampleTrain &e) |
AttrIdd | maxCount () const |
const Counters & | get () const |
access to counters More... | |
int | getSum () const |
optimization: instead of accumulate all values from counters container keep the integer member More... | |
double | entropy () const |
entropy of counters More... | |
Beliefs | getHistogram () const |
histogram from counters - Beliefs class where each position is counter divided by counters sum. More... | |
helping functor for calculate histogram based on categories for collection of train examples. It could be used to find major category.
|
inline |
c-tor, empty counters
|
inline |
c-tor, counters initialized by train examples collection
|
inline |
access to counters
Referenced by faif::ml::DecisionTree< Val >::prune().
|
inline |
optimization: instead of accumulate all values from counters container keep the integer member
Referenced by faif::ml::DecisionTree< Val >::prune().
|
inline |
entropy of counters
References faif::ml::calcEntropy().
Referenced by faif::ml::Classifier< Val >::ExamplesTrain::entropy(), and faif::ml::DecisionTree< Val >::prune().
|
inline |
histogram from counters - Beliefs class where each position is counter divided by counters sum.
Histogram is sorted from biggest to smallest probability
Referenced by faif::ml::DecisionTree< Val >::prune().