Vowpal Wabbit
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
explore.h File Reference
#include "vw/common/future_compat.h"
#include "vw/explore/explore_error_codes.h"
#include <cstdint>
#include "explore_internal.h"

Namespaces

namespace  VW
 
namespace  VW::explore
 
namespace  exploration
 

Macros

#define S_EXPLORATION_OK   0
 
#define E_EXPLORATION_BAD_RANGE   1
 
#define E_EXPLORATION_PMF_RANKING_SIZE_MISMATCH   2
 
#define E_EXPLORATION_BAD_PDF   3
 
#define E_EXPLORATION_BAD_EPSILON   4
 

Functions

template<typename It >
int VW::explore::generate_epsilon_greedy (float epsilon, uint32_t top_action, It pmf_first, It pmf_last)
 Experimental: Generates epsilon-greedy style exploration distribution. More...
 
template<typename InputIt , typename OutputIt >
int VW::explore::generate_softmax (float lambda, InputIt scores_first, InputIt scores_last, OutputIt pmf_first, OutputIt pmf_last)
 Generates softmax style exploration distribution. More...
 
template<typename InputIt , typename OutputIt >
int VW::explore::generate_bag (InputIt top_actions_first, InputIt top_actions_last, OutputIt pmf_first, OutputIt pmf_last)
 Generates an exploration distribution according to votes on actions. More...
 
template<typename It >
int VW::explore::enforce_minimum_probability (float uniform_epsilon, bool consider_zero_valued_elements, It pmf_first, It pmf_last)
 Updates the pmf to ensure each action is explored with at least minimum_uniform/num_actions. More...
 
template<typename It >
int VW::explore::mix_with_uniform (float uniform_epsilon, It pmf_first, It pmf_last)
 Mix original PMF with uniform distribution. More...
 
template<typename It >
int VW::explore::sample_after_normalizing (uint64_t seed, It pmf_first, It pmf_last, uint32_t &chosen_index)
 Sample an index from the provided pmf. If the pmf is not normalized it will be updated in-place. More...
 
template<typename It >
int VW::explore::sample_after_normalizing (const char *seed, It pmf_first, It pmf_last, uint32_t &chosen_index)
 Sample an index from the provided pmf. If the pmf is not normalized it will be updated in-place. More...
 
template<typename ActionIt >
int VW::explore::swap_chosen (ActionIt action_first, ActionIt action_last, uint32_t chosen_index)
 Swap the first value with the chosen index. More...
 
template<typename It >
int VW::explore::sample_pdf (uint64_t *p_seed, It pdf_first, It pdf_last, float &chosen_value, float &pdf_value)
 Sample a continuous value from the provided pdf. More...
 
template<typename It >
int exploration::generate_epsilon_greedy (float epsilon, uint32_t top_action, It pmf_first, It pmf_last)
 Function moved to VW::explore::generate_epsilon_greedy() More...
 
template<typename InputIt , typename OutputIt >
int exploration::generate_softmax (float lambda, InputIt scores_first, InputIt scores_last, OutputIt pmf_first, OutputIt pmf_last)
 Function moved to VW::explore::generate_softmax() More...
 
template<typename InputIt , typename OutputIt >
int exploration::generate_bag (InputIt top_actions_first, InputIt top_actions_last, OutputIt pmf_first, OutputIt pmf_last)
 Function moved to VW::explore::generate_bag() More...
 
template<typename It >
int exploration::enforce_minimum_probability (float uniform_epsilon, bool consider_zero_valued_elements, It pmf_first, It pmf_last)
 Function moved to VW::explore::enforce_minimum_probability() More...
 
template<typename It >
int exploration::mix_with_uniform (float uniform_epsilon, It pmf_first, It pmf_last)
 Function moved to VW::explore::mix_with_uniform() More...
 
template<typename It >
int exploration::sample_after_normalizing (uint64_t seed, It pmf_first, It pmf_last, uint32_t &chosen_index)
 Function moved to VW::explore::sample_after_normalizing() More...
 
template<typename It >
int exploration::sample_after_normalizing (const char *seed, It pmf_first, It pmf_last, uint32_t &chosen_index)
 Function moved to VW::explore::sample_after_normalizing() More...
 
template<typename ActionIt >
int exploration::swap_chosen (ActionIt action_first, ActionIt action_last, uint32_t chosen_index)
 Function moved to VW::explore::swap_chosen() More...
 
template<typename It >
int exploration::sample_pdf (uint64_t *p_seed, It pdf_first, It pdf_last, float &chosen_value, float &pdf_value)
 Function moved to VW::explore::sample_pdf() More...
 

Macro Definition Documentation

◆ E_EXPLORATION_BAD_EPSILON

#define E_EXPLORATION_BAD_EPSILON   4

◆ E_EXPLORATION_BAD_PDF

#define E_EXPLORATION_BAD_PDF   3

◆ E_EXPLORATION_BAD_RANGE

#define E_EXPLORATION_BAD_RANGE   1

◆ E_EXPLORATION_PMF_RANKING_SIZE_MISMATCH

#define E_EXPLORATION_PMF_RANKING_SIZE_MISMATCH   2

◆ S_EXPLORATION_OK

#define S_EXPLORATION_OK   0