#include <treebasedalgo.hh>
Inheritance diagram for Algo::TreeBasedAlgo:

Public Member Functions | |
| TreeBasedAlgo (std::vector< Data::Column * > &cols, std::vector< unsigned int > &learning, std::string &classification_col) | |
| virtual Tree::DecisionTree & | get_result () |
| const Tree::DecisionTree & | get_tree () const |
| return true | |
Protected Member Functions | |
| unsigned int | _compute_error (Tree::DecisionTree &tree) const |
| compute the error : the number of element in learning set that are not correclty classified | |
| unsigned int | _compute_error (Tree::DecisionTree &tree, unsigned int classe) const |
| compute the error : the number of element in learning set that are not in class ``classe'' | |
| unsigned int | _compute_n (Tree::DecisionTree &tree, bool learning) const |
| return the number of learning elements that match the tree | |
| template<typename Type> void | _compute_modalities (Data::ColumnTyped< Type > *col) |
| compute modalities of classification result | |
| bool | _match_ind_class (unsigned int ind, unsigned int classe) const |
| return true if the result classification if the same for the individual number ind and the class number classe | |
| float | _gini (Tree::DecisionTree &tree) |
| compute the gini fonction for a node in the tree | |
| float | _gini (Tree::DecisionTree &tree, unsigned int column) |
| compute the gini fonction for a node in the tree and for a variable | |
| template<typename Type> float | _gini (Tree::DecisionTree &tree, Data::ColumnTyped< Type > *col, unsigned int col_nb) |
| compute the gini fonction for a node in the tree and for a typed variable | |
| float | _entropie (Tree::DecisionTree &tree) |
| compute the entropie fonction for a node in the tree | |
| float | _entropie (Tree::DecisionTree &tree, unsigned int column) |
| compute the entropie fonction for a node in the tree and for a variable | |
| template<typename Type> float | TreeBasedAlgo::_entropie (Tree::DecisionTree &tree, Data::ColumnTyped< Type > *col, unsigned int col_nb) |
| compute the entropie fonction for a node in the tree and for a typed variable | |
| template<typename Type> float | _sub_construct_tree (Tree::DecisionTree &tree, Data::ColumnTyped< Type > *col, unsigned int col_nb) |
| , construct the tree when column is selected | |
|
template<typename Type> std::pair< unsigned int, unsigned int > | _get_classes (Tree::DecisionTree &inf_tree, Tree::DecisionTree &sup_tree, Data::ColumnTyped< Type > *col) |
| , return the destination class (optimized for binary tree) | |
| virtual void | _construct_tree (Tree::DecisionTree &tree) |
| private methode to start construction | |
Protected Attributes | |
| Tree::DecisionTree | _tree |
| result tree | |
| std::vector< Data::Column * > & | _cols |
| columns | |
| std::vector< unsigned int > & | _learning |
| learning data | |
| std::vector< unsigned int > | _test |
| test data | |
| std::vector< unsigned int > | _modalities |
| modalities of classification result (index in columns) | |
| unsigned int | _classification_col |
| classification column | |
Definition at line 36 of file treebasedalgo.hh.
|
||||||||||||||||
|
Definition at line 31 of file treebasedalgo.cc. References _classification_col, _cols, _compute_modalities(), and _test. |
1.3.2