Vowpal Wabbit slim predictor. Supports: regression, multi-class classification and contextual bandits.
More...
#include <vw_slim_predict.h>
|
| vw_predict () |
|
int | load (const char *model, size_t length) |
| Reads the Vowpal Wabbit model from the supplied buffer (produced using vw -f <modelname>) More...
|
|
bool | is_cb_explore_adf () |
| True if the model describes a contextual bandit (cb) model using action dependent features (afd) More...
|
|
bool | is_csoaa_ldf () |
| True if the model describes a cost sensitive one-against-all (csoaa). This is also true for cb_explore_adf models, as they are reduced to csoaa. More...
|
|
int | predict (example_predict &ex, float &score) |
| Predicts a score (as in regression) for the provided example. More...
|
|
int | predict (example_predict &shared, example_predict *actions, size_t num_actions, std::vector< float > &out_scores) |
|
int | predict (const char *event_id, example_predict &shared, example_predict *actions, size_t num_actions, std::vector< float > &pdf, std::vector< int > &ranking) |
|
uint32_t | feature_index_num_bits () |
|
|
template<typename PdfIt , typename InputScoreIt , typename OutputIt > |
static int | sort_by_scores (PdfIt pdf_first, PdfIt pdf_last, InputScoreIt scores_first, InputScoreIt scores_last, OutputIt ranking_begin, OutputIt ranking_last) |
|
template<typename W>
class vw_slim::vw_predict< W >
Vowpal Wabbit slim predictor. Supports: regression, multi-class classification and contextual bandits.
True if the model describes a contextual bandit (cb) model using action dependent features (afd)
- Returns
- true True if contextual bandit predict method can be used.
-
false False if contextual bandit predict method cannot be used.
True if the model describes a cost sensitive one-against-all (csoaa). This is also true for cb_explore_adf models, as they are reduced to csoaa.
- Returns
- true True if csoaa predict method can be used.
-
false False if csoaa predict method cannot be used.
Reads the Vowpal Wabbit model from the supplied buffer (produced using vw -f <modelname>)
- Parameters
-
model | The binary model. |
length | The length of the binary model. |
- Returns
- int Returns 0 (S_VW_PREDICT_OK) if succesful, otherwise one of the error codes (see E_VW_PREDICT_ERR_*).
Predicts a score (as in regression) for the provided example.
Regular regression with support for constant feature (bias term) and interactions
- Parameters
-
ex | The example to get the prediction for. |
score | The output score produced by the model. |
- Returns
- int Returns 0 (S_VW_PREDICT_OK) if succesful, otherwise one of the error codes (see E_VW_PREDICT_ERR_*).
template<typename W >
template<typename PdfIt , typename InputScoreIt , typename OutputIt >
static int vw_slim::vw_predict< W >::sort_by_scores |
( |
PdfIt |
pdf_first, |
|
|
PdfIt |
pdf_last, |
|
|
InputScoreIt |
scores_first, |
|
|
InputScoreIt |
scores_last, |
|
|
OutputIt |
ranking_begin, |
|
|
OutputIt |
ranking_last |
|
) |
| |
|
inlinestatic |
The documentation for this class was generated from the following file: