Feat C++ API
A feature engineering automation tool
FT::Opt::AutoBackProp Class Reference

#include <auto_backprop.h>

Collaboration diagram for FT::Opt::AutoBackProp:

Public Types

typedef VectorXf(* callback) (const VectorXf &, shared_ptr< CLabels > &, const vector< float > &)
 

Public Member Functions

 AutoBackProp (string scorer, int iters=1000, float n=0.1, float a=0.9)
 
void run (Individual &ind, const Data &d, const Parameters &params)
 adapt weights More...
 

Public Attributes

std::map< string, callbackd_score_hash
 
std::map< string, callbackscore_hash
 

Private Member Functions

void print_weights (NodeVector &program)
 
vector< Traceforward_prop (Individual &ind, const Data &d, MatrixXf &Phi, const Parameters &params)
 Return the f_stack. More...
 
void next_branch (vector< BP_NODE > &executing, vector< Node * > &bp_program, vector< ArrayXf > &derivatives)
 Updates stacks to have proper value on top. More...
 
void backprop (Trace &f_stack, NodeVector &program, int start, int end, float Beta, shared_ptr< CLabels > &yhat, const Data &d, vector< float > sw)
 Compute gradients and update weights. More...
 
void backprop2 (Trace &f_stack, NodeVector &program, int start, int end, float Beta, const VectorXf &yhat, const Data &d, vector< float > sw)
 Compute gradients and update weights. More...
 

Private Attributes

float n
 
float a
 
callback d_cost_func
 
callback cost_func
 
int iters
 
float epk
 
float epT
 

Detailed Description

Definition at line 62 of file auto_backprop.h.

Member Typedef Documentation

◆ callback

typedef VectorXf(* FT::Opt::AutoBackProp::callback) (const VectorXf &, shared_ptr< CLabels > &, const vector< float > &)

Definition at line 69 of file auto_backprop.h.

Constructor & Destructor Documentation

◆ AutoBackProp()

FT::Opt::AutoBackProp::AutoBackProp ( string  scorer,
int  iters = 1000,
float  n = 0.1,
float  a = 0.9 
)

Definition at line 16 of file auto_backprop.cc.

Member Function Documentation

◆ backprop()

void FT::Opt::AutoBackProp::backprop ( Trace f_stack,
NodeVector program,
int  start,
int  end,
float  Beta,
shared_ptr< CLabels > &  yhat,
const Data d,
vector< float >  sw 
)
private

Compute gradients and update weights.

Definition at line 235 of file auto_backprop.cc.

◆ backprop2()

void FT::Opt::AutoBackProp::backprop2 ( Trace f_stack,
NodeVector program,
int  start,
int  end,
float  Beta,
const VectorXf &  yhat,
const Data d,
vector< float >  sw 
)
private

Compute gradients and update weights.

◆ forward_prop()

vector< Trace > FT::Opt::AutoBackProp::forward_prop ( Individual ind,
const Data d,
MatrixXf &  Phi,
const Parameters params 
)
private

Return the f_stack.

Definition at line 191 of file auto_backprop.cc.

◆ next_branch()

void FT::Opt::AutoBackProp::next_branch ( vector< BP_NODE > &  executing,
vector< Node * > &  bp_program,
vector< ArrayXf > &  derivatives 
)
private

Updates stacks to have proper value on top.

Definition at line 204 of file auto_backprop.cc.

◆ print_weights()

void FT::Opt::AutoBackProp::print_weights ( NodeVector program)
private

Definition at line 42 of file auto_backprop.cc.

◆ run()

void FT::Opt::AutoBackProp::run ( Individual ind,
const Data d,
const Parameters params 
)

adapt weights

Definition at line 60 of file auto_backprop.cc.

Member Data Documentation

◆ a

float FT::Opt::AutoBackProp::a
private

Definition at line 89 of file auto_backprop.h.

◆ cost_func

callback FT::Opt::AutoBackProp::cost_func
private

Definition at line 91 of file auto_backprop.h.

◆ d_cost_func

callback FT::Opt::AutoBackProp::d_cost_func
private

Definition at line 90 of file auto_backprop.h.

◆ d_score_hash

std::map<string, callback> FT::Opt::AutoBackProp::d_score_hash

Definition at line 71 of file auto_backprop.h.

◆ epk

float FT::Opt::AutoBackProp::epk
private

Definition at line 94 of file auto_backprop.h.

◆ epT

float FT::Opt::AutoBackProp::epT
private

Definition at line 95 of file auto_backprop.h.

◆ iters

int FT::Opt::AutoBackProp::iters
private

Definition at line 93 of file auto_backprop.h.

◆ n

float FT::Opt::AutoBackProp::n
private

Definition at line 88 of file auto_backprop.h.

◆ score_hash

std::map<string, callback> FT::Opt::AutoBackProp::score_hash

Definition at line 72 of file auto_backprop.h.


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