Feat C++ API
A feature engineering automation tool
FT::Pop::Op::NodeSplit< T > Class Template Reference

#include <n_split.h>

Inheritance diagram for FT::Pop::Op::NodeSplit< T >:
Collaboration diagram for FT::Pop::Op::NodeSplit< T >:

Public Member Functions

 NodeSplit ()
 
void set_threshold (ArrayXf &x, VectorXf &y, bool classification)
 Uses a heuristic to set a splitting threshold. More...
 
float gain (const VectorXf &lsplit, const VectorXf &rsplit, bool classification=false, vector< float > unique_classes=vector< float >())
 returns the gain of a split More...
 
float gini_impurity_index (const VectorXf &classes, vector< float > uc)
 gini impurity of classes in classes More...
 
void evaluate (const Data &data, State &state)
 Evaluates the node and updates the state states. More...
 
void eval_eqn (State &state)
 Evaluates the node symbolically. More...
 
 NodeSplit ()
 
 NodeSplit ()
 
- Public Member Functions inherited from FT::Pop::Op::NodeTrain
bool isNodeTrain ()
 
- Public Member Functions inherited from FT::Pop::Op::Node
 Node ()
 
virtual ~Node ()
 
unsigned int total_arity ()
 
ArrayXf limited (ArrayXf x)
 limits node output to be between MIN_FLT and MAX_FLT More...
 
void eval_complexity (map< char, vector< unsigned int >> &cstate)
 evaluates complexity of this node in the context of its child nodes. More...
 
void eval_complexity_db (map< char, vector< string >> &cstate)
 evaluates complexity of this node in the context of its child nodes. More...
 
virtual bool isNodeDx ()
 check of node type More...
 
std::unique_ptr< Nodeclone () const
 makes a unique copy of this node More...
 
std::unique_ptr< Nodernd_clone () const
 makes a randomized unique copy ofnode More...
 

Public Attributes

float threshold
 
- Public Attributes inherited from FT::Pop::Op::NodeTrain
bool train
 
- Public Attributes inherited from FT::Pop::Op::Node
string name
 node type More...
 
string variable_name
 variable name, if any More...
 
char otype
 output type More...
 
std::map< char, unsigned int > arity
 arity of the operator More...
 
int complexity
 complexity of node More...
 
int visits = 0
 

Protected Member Functions

NodeSplitclone_impl () const override
 
NodeSplitrnd_clone_impl () const override
 

Detailed Description

template<class T>
class FT::Pop::Op::NodeSplit< T >

Definition at line 15 of file n_split.h.

Constructor & Destructor Documentation

◆ NodeSplit() [1/3]

template<class T >
FT::Pop::Op::NodeSplit< T >::NodeSplit ( )

◆ NodeSplit() [2/3]

Definition at line 12 of file n_split.cc.

◆ NodeSplit() [3/3]

Definition at line 24 of file n_split.cc.

Member Function Documentation

◆ clone_impl()

template<class T >
NodeSplit< T > * FT::Pop::Op::NodeSplit< T >::clone_impl
overrideprotectedvirtual

Implements FT::Pop::Op::Node.

Definition at line 95 of file n_split.cc.

◆ eval_eqn()

template<class T >
void FT::Pop::Op::NodeSplit< T >::eval_eqn ( State state)
virtual

Evaluates the node symbolically.

Implements FT::Pop::Op::Node.

Definition at line 84 of file n_split.cc.

◆ evaluate()

template<class T >
void FT::Pop::Op::NodeSplit< T >::evaluate ( const Data data,
State state 
)
virtual

Evaluates the node and updates the state states.

Implements FT::Pop::Op::Node.

Definition at line 36 of file n_split.cc.

◆ gain()

template<class T >
float FT::Pop::Op::NodeSplit< T >::gain ( const VectorXf &  lsplit,
const VectorXf &  rsplit,
bool  classification = false,
vector< float >  unique_classes = vector<float>() 
)

returns the gain of a split

Definition at line 180 of file n_split.cc.

◆ gini_impurity_index()

template<class T >
float FT::Pop::Op::NodeSplit< T >::gini_impurity_index ( const VectorXf &  classes,
vector< float >  uc 
)

gini impurity of classes in classes

Definition at line 206 of file n_split.cc.

◆ rnd_clone_impl()

template<class T >
NodeSplit< T > * FT::Pop::Op::NodeSplit< T >::rnd_clone_impl
overrideprotectedvirtual

Implements FT::Pop::Op::Node.

Definition at line 99 of file n_split.cc.

◆ set_threshold()

template<class T >
void FT::Pop::Op::NodeSplit< T >::set_threshold ( ArrayXf &  x,
VectorXf &  y,
bool  classification 
)

Uses a heuristic to set a splitting threshold.

Definition at line 103 of file n_split.cc.

Member Data Documentation

◆ threshold

template<class T >
float FT::Pop::Op::NodeSplit< T >::threshold

Definition at line 19 of file n_split.h.


The documentation for this class was generated from the following files: