|
Vowpal Wabbit
|
Functions | |
| float | binary_search (float fhat, float delta, float sens, float tol=1e-6f) |
| void | get_cost_ranges (float delta, VW::LEARNER::learner &base, VW::multi_ex &examples, bool min_only, float min_cb_cost, float max_cb_cost, std::vector< float > &min_costs, std::vector< float > &max_costs, std::vector< VW::action_scores > &ex_as, std::vector< std::vector< VW::cb_class > > &ex_costs) |
Variables | |
| constexpr int | BINARY_SEARCH_MAX_ITER = 20 |
|
inline |
Binary search to find the largest weight w such that w * (fhat^2 - (fhat - w * sens)^2) <= delta. See Section 7.1 in https://arxiv.org/pdf/1703.01014.pdf.
| void VW::confidence_sequence_utility::get_cost_ranges | ( | float | delta, |
| VW::LEARNER::learner & | base, | ||
| VW::multi_ex & | examples, | ||
| bool | min_only, | ||
| float | min_cb_cost, | ||
| float | max_cb_cost, | ||
| std::vector< float > & | min_costs, | ||
| std::vector< float > & | max_costs, | ||
| std::vector< VW::action_scores > & | ex_as, | ||
| std::vector< std::vector< VW::cb_class > > & | ex_costs | ||
| ) |
Compute cost ranges [min_cost, max_cost] for each action using sensitivity analysis. Used by both RegCB and SquareCB reductions.
| delta | Threshold on empirical loss difference (controls confidence width). |
| base | The base learner used for sensitivity queries. |
| examples | The multiline example set (action predictions are backed up and restored). |
| min_only | If true, only compute minimum costs (used by RegCB optimistic variant). |
| min_cb_cost | Lower bound on CB costs (e.g., 0). |
| max_cb_cost | Upper bound on CB costs (e.g., 1). |
| min_costs | Output vector of minimum cost for each action. |
| max_costs | Output vector of maximum cost for each action (unchanged if min_only). |
| ex_as | Scratch buffer for backing up action scores. |
| ex_costs | Scratch buffer for backing up CB costs. |
|
constexpr |