Vowpal Wabbit
Classes | Functions
GEN_CS Namespace Reference

Classes

struct  cb_to_cs
 
struct  cb_to_cs_adf
 

Functions

float safe_probability (float prob)
 
void gen_cs_example_ips (cb_to_cs &c, CB::label &ld, COST_SENSITIVE::label &cs_ld, float clip_p=0.f)
 
template<bool is_learn>
void gen_cs_example_dm (cb_to_cs &c, example &ec, CB::label &ld, COST_SENSITIVE::label &cs_ld)
 
template<bool is_learn>
void gen_cs_label (cb_to_cs &c, example &ec, COST_SENSITIVE::label &cs_ld, uint32_t action, float clip_p=0.f)
 
template<bool is_learn>
void gen_cs_example_dr (cb_to_cs &c, example &ec, CB::label &ld, COST_SENSITIVE::label &cs_ld, float=0.f)
 
template<bool is_learn>
void gen_cs_example (cb_to_cs &c, example &ec, CB::label &ld, COST_SENSITIVE::label &cs_ld)
 
void gen_cs_test_example (multi_ex &examples, COST_SENSITIVE::label &cs_labels)
 
void gen_cs_example_ips (multi_ex &examples, COST_SENSITIVE::label &cs_labels, float clip_p=0.f)
 
void gen_cs_example_dm (multi_ex &examples, COST_SENSITIVE::label &cs_labels)
 
void gen_cs_example_mtr (cb_to_cs_adf &c, multi_ex &ec_seq, COST_SENSITIVE::label &cs_labels)
 
void gen_cs_example_sm (multi_ex &examples, uint32_t chosen_action, float sign_offset, ACTION_SCORE::action_scores action_vals, COST_SENSITIVE::label &cs_labels)
 
template<bool is_learn>
void gen_cs_example_dr (cb_to_cs_adf &c, multi_ex &examples, COST_SENSITIVE::label &cs_labels, float clip_p=0.f)
 
template<bool is_learn>
void gen_cs_example (cb_to_cs_adf &c, multi_ex &ec_seq, COST_SENSITIVE::label &cs_labels)
 
void cs_prep_labels (multi_ex &examples, std::vector< CB::label > &cb_labels, COST_SENSITIVE::label &cs_labels, std::vector< COST_SENSITIVE::label > &prepped_cs_labels, uint64_t offset)
 
template<bool is_learn>
void cs_ldf_learn_or_predict (VW::LEARNER::multi_learner &base, multi_ex &examples, std::vector< CB::label > &cb_labels, COST_SENSITIVE::label &cs_labels, std::vector< COST_SENSITIVE::label > &prepped_cs_labels, bool predict_first, uint64_t offset, size_t id=0)
 

Function Documentation

template<bool is_learn>
void GEN_CS::cs_ldf_learn_or_predict ( VW::LEARNER::multi_learner base,
multi_ex examples,
std::vector< CB::label > &  cb_labels,
COST_SENSITIVE::label cs_labels,
std::vector< COST_SENSITIVE::label > &  prepped_cs_labels,
bool  predict_first,
uint64_t  offset,
size_t  id = 0 
)
void GEN_CS::cs_prep_labels ( multi_ex examples,
std::vector< CB::label > &  cb_labels,
COST_SENSITIVE::label cs_labels,
std::vector< COST_SENSITIVE::label > &  prepped_cs_labels,
uint64_t  offset 
)
template<bool is_learn>
void GEN_CS::gen_cs_example ( cb_to_cs c,
example ec,
CB::label ld,
COST_SENSITIVE::label cs_ld 
)
template<bool is_learn>
void GEN_CS::gen_cs_example ( cb_to_cs_adf c,
multi_ex ec_seq,
COST_SENSITIVE::label cs_labels 
)
template<bool is_learn>
void GEN_CS::gen_cs_example_dm ( cb_to_cs c,
example ec,
CB::label ld,
COST_SENSITIVE::label cs_ld 
)
void GEN_CS::gen_cs_example_dm ( multi_ex examples,
COST_SENSITIVE::label cs_labels 
)
template<bool is_learn>
void GEN_CS::gen_cs_example_dr ( cb_to_cs c,
example ec,
CB::label ld,
COST_SENSITIVE::label cs_ld,
float  = 0.f 
)
template<bool is_learn>
void GEN_CS::gen_cs_example_dr ( cb_to_cs_adf c,
multi_ex examples,
COST_SENSITIVE::label cs_labels,
float  clip_p = 0.f 
)
void GEN_CS::gen_cs_example_ips ( cb_to_cs c,
CB::label ld,
COST_SENSITIVE::label cs_ld,
float  clip_p = 0.f 
)
void GEN_CS::gen_cs_example_ips ( multi_ex examples,
COST_SENSITIVE::label cs_labels,
float  clip_p = 0.f 
)
void GEN_CS::gen_cs_example_mtr ( cb_to_cs_adf c,
multi_ex ec_seq,
COST_SENSITIVE::label cs_labels 
)
void GEN_CS::gen_cs_example_sm ( multi_ex examples,
uint32_t  chosen_action,
float  sign_offset,
ACTION_SCORE::action_scores  action_vals,
COST_SENSITIVE::label cs_labels 
)
template<bool is_learn>
void GEN_CS::gen_cs_label ( cb_to_cs c,
example ec,
COST_SENSITIVE::label cs_ld,
uint32_t  action,
float  clip_p = 0.f 
)
void GEN_CS::gen_cs_test_example ( multi_ex examples,
COST_SENSITIVE::label cs_labels 
)
float GEN_CS::safe_probability ( float  prob)