faif
|
the clasiffier interface More...
#include <Classifier.hpp>
Classes | |
class | ExamplesTrain |
inner class - examples train collection More... | |
struct | InitValueId |
the helping inner class to init PointAndFeature structure using getUnknownId method More... | |
Public Types | |
typedef Val | Value |
typedef Val::Value | AttrValue |
attribute value representation in learning More... | |
typedef Val::DomainType | AttrDomain |
the attribute domain for learning More... | |
typedef Val::DomainType::ValueId | AttrIdd |
attribute id representation in learning More... | |
typedef Val::DomainType::ValueIdSerialize | AttrIddSerialize |
for serialization the const interferes More... | |
typedef Space< AttrDomain > | Domains |
typedef Belief< Val >::Beliefs | Beliefs |
collection of pair (AttrIdd, Probability) More... | |
typedef Point< Val > | ExampleTest |
the test example (collection of AttrIdd) More... | |
typedef PointAndFeature< Val, AttrIdd, InitValueId > | ExampleTrain |
the train example (test example and the category) More... | |
Public Member Functions | |
Classifier (const Domains &attr_domains, const AttrDomain &category_domain) | |
const Domains & | getAttrDomains () const |
accessor More... | |
const AttrDomain & | getCategoryDomain () const |
accessor More... | |
AttrIdd | getCategoryIdd (const AttrValue &val) const |
accessor (helper) More... | |
virtual void | reset ()=0 |
the clasiffier will have no knowledge More... | |
virtual void | train (const ExamplesTrain &)=0 |
learn classifier (on the collection of training examples) More... | |
virtual AttrIdd | getCategory (const ExampleTest &example) const =0 |
classify More... | |
virtual Beliefs | getCategories (const ExampleTest &example) const =0 |
classify and return all classes with belief that the example is from each class classes are sorted from the best (index 0) to the worst More... | |
virtual void | write (std::ostream &os) const |
Friends | |
class | boost::serialization::access |
serialization using boost::serialization More... | |
the clasiffier interface
type definitions for AttrValue, AttrDomain, AttrIdd and others
Store attribute domains and category domain, methods to create training/testing example, load/save (boost::serialization), pure virtual for training and classifing.
typedef Val::Value faif::ml::Classifier< Val >::AttrValue |
attribute value representation in learning
typedef Val::DomainType faif::ml::Classifier< Val >::AttrDomain |
the attribute domain for learning
typedef Val::DomainType::ValueId faif::ml::Classifier< Val >::AttrIdd |
attribute id representation in learning
typedef Val::DomainType::ValueIdSerialize faif::ml::Classifier< Val >::AttrIddSerialize |
for serialization the const interferes
typedef Space<AttrDomain> faif::ml::Classifier< Val >::Domains |
the domain collection; the pointers should be valid
typedef Belief<Val>::Beliefs faif::ml::Classifier< Val >::Beliefs |
collection of pair (AttrIdd, Probability)
typedef Point<Val> faif::ml::Classifier< Val >::ExampleTest |
the test example (collection of AttrIdd)
typedef PointAndFeature<Val, AttrIdd, InitValueId> faif::ml::Classifier< Val >::ExampleTrain |
the train example (test example and the category)
|
inline |
accessor
Referenced by faif::ml::createExample(), faif::ml::createExampleStrict(), and faif::ml::RandomForest< Val >::getCategories().
|
inline |
accessor
Referenced by faif::ml::createExample().
|
inline |
|
pure virtual |
the clasiffier will have no knowledge
Implemented in faif::ml::RandomForest< Val >, faif::ml::DecisionTree< Val >, faif::ml::KNearestNeighbor< Val, Distance >, and faif::ml::NaiveBayesian< Val >.
Referenced by faif::ml::Classifier< Val >::getCategoryIdd(), and faif::ml::testRange().
|
pure virtual |
learn classifier (on the collection of training examples)
Implemented in faif::ml::RandomForest< Val >, faif::ml::DecisionTree< Val >, faif::ml::KNearestNeighbor< Val, Distance >, and faif::ml::NaiveBayesian< Val >.
Referenced by faif::ml::Classifier< Val >::getCategoryIdd(), and faif::ml::testRange().
|
pure virtual |
classify
Implemented in faif::ml::RandomForest< Val >, faif::ml::DecisionTree< Val >, faif::ml::KNearestNeighbor< Val, Distance >, and faif::ml::NaiveBayesian< Val >.
Referenced by faif::ml::Classifier< Val >::getCategoryIdd().
|
pure virtual |
classify and return all classes with belief that the example is from each class classes are sorted from the best (index 0) to the worst
Implemented in faif::ml::RandomForest< Val >, faif::ml::KNearestNeighbor< Val, Distance >, faif::ml::DecisionTree< Val >, and faif::ml::NaiveBayesian< Val >.
Referenced by faif::ml::Classifier< Val >::getCategoryIdd().
|
virtual |
the ostream method
Reimplemented in faif::ml::KNearestNeighbor< Val, Distance >, faif::ml::DecisionTree< Val >, and faif::ml::NaiveBayesian< Val >.
Referenced by faif::ml::Classifier< Val >::getCategoryIdd(), and faif::ml::NaiveBayesian< Val >::write().
|
friend |
serialization using boost::serialization