-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C API Utilities
peterychang edited this page Apr 23, 2020
·
1 revision
void save_predictor(vw& all, std::string reg_name);
void save_predictor(vw& all, io_buf& buf);
inline uint64_t hash_space(vw& all, const std::string& s)
inline uint64_t hash_space_static(const std::string& s, const std::string& hash)
inline uint64_t hash_space_cstr(vw& all, const char* fstr)
// Then use it as the seed for hashing features.
inline uint64_t hash_feature(vw& all, const std::string& s, uint64_t u)
inline uint64_t hash_feature_static(const std::string& s, uint64_t u, const std::string& h, uint32_t num_bits)
inline uint64_t hash_feature_cstr(vw& all, char* fstr, uint64_t u)
inline float get_weight(vw& all, uint32_t index, uint32_t offset)
inline void set_weight(vw& all, uint32_t index, uint32_t offset, float value)
inline uint32_t num_weights(vw& all) { return (uint32_t)all.length(); }
inline uint32_t get_stride(vw& all) { return all.weights.stride(); }
inline void init_features(primitive_feature_space& fs, size_t features_count)
inline void set_feature(primitive_feature_space& fs, size_t index, uint64_t feature_hash, float value)
void save_predictor(vw& all, io_buf& buf); // Don’t expose io_buf. Maybe allow some kind of file handle instead?
inline uint64_t hash_space(vw& all, const std::string& s) // Generic interface uses hash type
inline uint64_t hash_feature(vw& all, const std::string& s, uint64_t u) // Generic interface uses hash type
ErrorCode save_predictor(const vw* all, const char* filename)
uint64_t vw_hash(const vw* all, const uint8_t* data, size_t length, HashType hash_type)
uint64_t vw_hash_str(vw* all, const char*)
uint64_t vw_hash_seed(const vw* all, const uint8_t* data, size_t length, uint64_t seed, HashType hash_type)
uint64_t vw_hash_seed_str(vw* all, const char* data, uint64_t seed)
float get_weight(const vw*, uint32_t idx, uint32_t offset)
void set_weight(vw*, uint32_t idx, uint32_t offset, float value)
size_t num_weights(const vw*)
uint32_t get_stride(const vw*)
primitive_feature_space* create_features(size_t size)
void set_feature(primitive_feature_space* fs, size_t index, uint64_t feature_hash, float value) // not reaslly necessary, but maybe handy to keep around? We can unexpose the primitive_feature_space if we have this
- Home
- First Steps
- Input
- Command line arguments
- Model saving and loading
- Controlling VW's output
- Audit
- Algorithm details
- Awesome Vowpal Wabbit
- Learning algorithm
- Learning to Search subsystem
- Loss functions
- What is a learner?
- Docker image
- Model merging
- Evaluation of exploration algorithms
- Reductions
- Contextual Bandit algorithms
- Contextual Bandit Exploration with SquareCB
- Contextual Bandit Zeroth Order Optimization
- Conditional Contextual Bandit
- Slates
- CATS, CATS-pdf for Continuous Actions
- Automl
- Epsilon Decay
- Warm starting contextual bandits
- Efficient Second Order Online Learning
- Latent Dirichlet Allocation
- VW Reductions Workflows
- Interaction Grounded Learning
- CB with Large Action Spaces
- CB with Graph Feedback
- FreeGrad
- Marginal
- Active Learning
- Eigen Memory Trees (EMT)
- Element-wise interaction
- Bindings
-
Examples
- Logged Contextual Bandit example
- One Against All (oaa) multi class example
- Weighted All Pairs (wap) multi class example
- Cost Sensitive One Against All (csoaa) multi class example
- Multiclass classification
- Error Correcting Tournament (ect) multi class example
- Malicious URL example
- Daemon example
- Matrix factorization example
- Rcv1 example
- Truncated gradient descent example
- Scripts
- Implement your own joint prediction model
- Predicting probabilities
- murmur2 vs murmur3
- Weight vector
- Matching Label and Prediction Types Between Reductions
- Zhen's Presentation Slides on enhancements to vw
- EZExample Archive
- Design Documents
- Contribute: