vowpalwabbit

What does --passes do in Python VowpalWabbit?

可紊 提交于 2020-05-14 09:07:09
问题 The --passes flag is the number of training passes. But it's unclear what the notion of passes means when training a Python VW model, within a for loop for example. e.g. If I'm training a model example by example within a for-loop like this: for line in train: model.learn(line) How could there be multiple passes if each training sample is learned from only once? 回答1: In Python the passes option only affect when the inbuilt driver is used. This only occurs when a data file and or passes is

What does --passes do in Python VowpalWabbit?

那年仲夏 提交于 2020-05-14 09:07:09
问题 The --passes flag is the number of training passes. But it's unclear what the notion of passes means when training a Python VW model, within a for loop for example. e.g. If I'm training a model example by example within a for-loop like this: for line in train: model.learn(line) How could there be multiple passes if each training sample is learned from only once? 回答1: In Python the passes option only affect when the inbuilt driver is used. This only occurs when a data file and or passes is

Is it reasonable for l1/l2 regularization to cause all feature weights to be zero in vowpal wabbit?

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-01 08:28:37
问题 I got a weird result from vw , which uses online learning scheme for logistic regression. And when I add --l1 or --l2 regularization then I got all predictions at 0.5 (that means all features are 0) Here's my command: vw -d training_data.txt --loss_function logistic -f model_l1 --invert_hash model_readable_l1 --l1 0.05 --link logistic ...and here's learning process info: using l1 regularization = 0.05 final_regressor = model_l1 Num weight bits = 18 learning rate = 0.5 initial_t = 0 power_t =

How to demo Vowpal Wabbit's contextual bandits in real online mode? [closed]

孤人 提交于 2020-01-22 14:16:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Following the available docs and resources, it is not really clear how to accomplish a simple getting-started flow where you'd launch Vowpal Wabbit as a daemon (possibly even without any pre-learnt model) and have it online learn and explore ― I'm looking for a flow where I'd feed

Vowpal Wabbit: obtaining a readable_model when in --daemon mode

╄→尐↘猪︶ㄣ 提交于 2020-01-17 12:41:13
问题 I am trying to stream my data to vw in --daemon mode, and would like to obtain at the end the value of the coefficients for each variable. Therefore I'd like vw in --daemon mode to either: - send me back the current value of the coefficients for each line of data I send. - Write the resulting model in the "--readable_model" format. I know about the dummy example trick save_namemodel | ... to get vw in daemon mode to save the model to a given file, but it isn't enough as I can't access the

Vowpal Wabbit execute without writing to disk

可紊 提交于 2019-12-25 00:09:24
问题 I wrote a java code to execute Vowpal Wabbit in the following way: System.out.println("Executing command " + command); final Runtime r = Runtime.getRuntime(); final Process p = r.exec(command); System.out.println("waiting for the process"); try (final BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()))) { String line; while ((line = b.readLine()) != null) { final T lineResult = textParser.parseLine(line); parserResultCombiner.addToCombiner(lineResult); } } p

How to use vowpal wabbit for online prediction (streaming mode)

爱⌒轻易说出口 提交于 2019-12-23 02:52:50
问题 I am trying to use Vowpal Wabbit for one multi class classification task with 154 different class labels as follows: Trained VW model with large amount of data. Tested the model with one dedicated test set. In this scenario I was able to hit >80% result, which is good. But the problem which currently I am working on is: I have to replicate the real time prediction scenario. In this case I have to pass one data point (i.e text line) at a time so that model can predict the value and output. I

Multidimensional hyperparameter search with vw-hypersearch in Vowpal Wabbit

戏子无情 提交于 2019-12-22 10:35:21
问题 vw-hypersearch is the Vowpal Wabbit wrapper intended to optimize hyperparameters in vw models: regularization rates, learning rates and decays, minibatches, bootstrap sizes etc. In the tutorial for vw-hypersearch there is a following example: vw-hypersearch 1e-10 5e-4 vw --l1 % train.dat Here % means the parameter to be optimized, 1e-10 5e-4 are the lower and upper bounds for the interval over which to search. The library uses golden section search method to minimize the number of iterations.

How to compute the log-likelihood of the LDA model in vowpal wabbit

末鹿安然 提交于 2019-12-22 10:19:55
问题 I am typical, regular, everyday R user. In R there is very helpful lda.collapsed.gibbs.sampler in lda package tha uses a collapsed Gibbs sampler to fit a latent Dirichlet allocation (LDA) model and returns point estimates of the latent parameters using the state at the last iteration of Gibbs sampling. This function also has a great parameter compute.log.likelihood which, when set to TRUE , will cause the sampler to compute the log likelihood of the words (to within a constant factor) after

Vowpal Wabbit - How to get prediction probabilities from contextual bandit model on a test sample

萝らか妹 提交于 2019-12-22 08:38:06
问题 Given a trained contextual bandit model, how can I retrieve a prediction vector on test samples? For example, let's say I have a train set named "train.dat" containing lines formatted as below 1:-1:0.3 | a b c # <action:cost:probability | features> 2:2:0.3 | a d d 3:-1:0.3 | a b e .... And I run below command. vw -d train.dat --cb 30 -f cb.model --save_resume This produces a file, 'cb.model'. Now, let's say I have a test dataset as below | a d d | a b e I'd like to see probabilities as below