Vowpal Wabbit
Classes | Namespaces | Macros | Functions | Variables
gd.cc File Reference
#include "crossplat_compat.h"
#include <float.h>
#include <netdb.h>
#include "gd.h"
#include "accumulate.h"
#include "reductions.h"
#include "vw.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  GD::gd
 
struct  GD::string_value
 
struct  GD::audit_results
 
struct  GD::trunc_data
 
struct  GD::power_data
 
struct  GD::norm_data
 
class  GD::set_initial_gd_wrapper< T >
 

Namespaces

 GD
 

Macros

#define VERSION_SAVE_RESUME_FIX   "7.10.1"
 
#define VERSION_PASS_UINT64   "8.3.3"
 

Functions

void GD::sync_weights (vw &all)
 
float GD::quake_InvSqrt (float x)
 
static float GD::InvSqrt (float x)
 
template<bool sqrt_rate, bool feature_mask_off, size_t adaptive, size_t normalized, size_t spare>
void GD::update_feature (float &update, float x, float &fw)
 
template<bool sqrt_rate, size_t adaptive, size_t normalized>
float GD::average_update (float total_weight, float normalized_sum_norm_x, float neg_norm_power)
 
template<bool sqrt_rate, bool feature_mask_off, size_t adaptive, size_t normalized, size_t spare>
void GD::train (gd &g, example &ec, float update)
 
void GD::end_pass (gd &g)
 
bool GD::operator< (const string_value &first, const string_value &second)
 
void GD::audit_interaction (audit_results &dat, const audit_strings *f)
 
void GD::audit_feature (audit_results &dat, const float ft_weight, const uint64_t ft_idx)
 
void GD::print_lda_features (vw &all, example &ec)
 
void GD::print_features (vw &all, example &ec)
 
void GD::print_audit_features (vw &all, example &ec)
 
float GD::finalize_prediction (shared_data *sd, float ret)
 
void GD::vec_add_trunc (trunc_data &p, const float fx, float &fw)
 
float GD::trunc_predict (vw &all, example &ec, double gravity)
 
void GD::vec_add_print (float &p, const float fx, float &fw)
 
template<bool l1, bool audit>
void GD::predict (gd &g, base_learner &, example &ec)
 
template<class T >
void GD::vec_add_trunc_multipredict (multipredict_info< T > &mp, const float fx, uint64_t fi)
 
template<bool l1, bool audit>
void GD::multipredict (gd &g, base_learner &, example &ec, size_t count, size_t step, polyprediction *pred, bool finalize_predictions)
 
template<bool sqrt_rate, size_t adaptive, size_t normalized>
float GD::compute_rate_decay (power_data &s, float &fw)
 
template<bool sqrt_rate, bool feature_mask_off, size_t adaptive, size_t normalized, size_t spare, bool stateless>
void GD::pred_per_update_feature (norm_data &nd, float x, float &fw)
 
template<bool sqrt_rate, bool feature_mask_off, bool adax, size_t adaptive, size_t normalized, size_t spare, bool stateless>
float GD::get_pred_per_update (gd &g, example &ec)
 
template<bool sqrt_rate, bool feature_mask_off, bool adax, size_t adaptive, size_t normalized, size_t spare, bool stateless>
float GD::sensitivity (gd &g, example &ec)
 
template<size_t adaptive>
float GD::get_scale (gd &g, example &, float weight)
 
template<bool sqrt_rate, bool feature_mask_off, bool adax, size_t adaptive, size_t normalized, size_t spare>
float GD::sensitivity (gd &g, base_learner &, example &ec)
 
template<bool sparse_l2, bool invariant, bool sqrt_rate, bool feature_mask_off, bool adax, size_t adaptive, size_t normalized, size_t spare>
float GD::compute_update (gd &g, example &ec)
 
template<bool sparse_l2, bool invariant, bool sqrt_rate, bool feature_mask_off, bool adax, size_t adaptive, size_t normalized, size_t spare>
void GD::update (gd &g, base_learner &, example &ec)
 
template<bool sparse_l2, bool invariant, bool sqrt_rate, bool feature_mask_off, bool adax, size_t adaptive, size_t normalized, size_t spare>
void GD::learn (gd &g, base_learner &base, example &ec)
 
size_t GD::write_index (io_buf &model_file, std::stringstream &msg, bool text, uint32_t num_bits, uint64_t i)
 
template<class T >
void GD::save_load_regressor (vw &all, io_buf &model_file, bool read, bool text, T &weights)
 
void GD::save_load_regressor (vw &all, io_buf &model_file, bool read, bool text)
 
template<class T >
void GD::save_load_online_state (vw &all, io_buf &model_file, bool read, bool text, gd *g, std::stringstream &msg, uint32_t ftrl_size, T &weights)
 
void GD::save_load_online_state (vw &all, io_buf &model_file, bool read, bool text, double &total_weight, gd *g, uint32_t ftrl_size)
 
void GD::save_load (gd &g, io_buf &model_file, bool read, bool text)
 
template<bool sparse_l2, bool invariant, bool sqrt_rate, bool feature_mask_off, uint64_t adaptive, uint64_t normalized, uint64_t spare, uint64_t next>
uint64_t GD::set_learn (vw &all, gd &g)
 
template<bool sparse_l2, bool invariant, bool sqrt_rate, uint64_t adaptive, uint64_t normalized, uint64_t spare, uint64_t next>
uint64_t GD::set_learn (vw &all, bool feature_mask_off, gd &g)
 
template<bool invariant, bool sqrt_rate, uint64_t adaptive, uint64_t normalized, uint64_t spare, uint64_t next>
uint64_t GD::set_learn (vw &all, bool feature_mask_off, gd &g)
 
template<bool sqrt_rate, uint64_t adaptive, uint64_t normalized, uint64_t spare, uint64_t next>
uint64_t GD::set_learn (vw &all, bool feature_mask_off, gd &g)
 
template<bool sqrt_rate, uint64_t adaptive, uint64_t spare>
uint64_t GD::set_learn (vw &all, bool feature_mask_off, gd &g)
 
template<bool sqrt_rate>
uint64_t GD::set_learn (vw &all, bool feature_mask_off, gd &g)
 
uint64_t GD::ceil_log_2 (uint64_t v)
 
base_learnerGD::setup (options_i &options, vw &all)
 

Variables

constexpr float GD::x_min = 1.084202e-19f
 
constexpr float GD::x2_min = x_min * x_min
 
constexpr float GD::x2_max = FLT_MAX
 
bool GD::global_print_features = false
 

Macro Definition Documentation

◆ VERSION_PASS_UINT64

#define VERSION_PASS_UINT64   "8.3.3"

Definition at line 34 of file gd.cc.

Referenced by GD::save_load_online_state().

◆ VERSION_SAVE_RESUME_FIX

#define VERSION_SAVE_RESUME_FIX   "7.10.1"

Definition at line 33 of file gd.cc.

Referenced by GD::save_load(), and GD::save_load_online_state().