0

I have troubles with understanding how I can work with Vowpal Wabbit (in this context, it doesn't matter. It can be something like one).

There are several steps of working with this program:

  1. prepare data
  2. train a model
  3. ?
  4. profit

What step will be number 3?

I have found 2 ways of working with vowpal from my java app.

One of them is creating a vowpal process with necessary parameters like a path to a created model. But there is a problem. I am not sure, that this approach is good in a concurrent environment. Of course, I can run a stuck of processes for each thread, but it will be not ok.

Another way is running a vowpal daemon and connect to it via a socket connection. I see problems here too. For instance, I have to create a socket connection and send some data to a daemon. Then, I have to wait for a result, but I don't know when a result will be ready. Also, when I will receive data from a daemon, I don't know which chunk of data is the last. A result of work is just a string and its format doesn't let me process an output stream correctly.

Maybe are there other ways of working with vowpal wabbit, which are more productive and more reliable?

arielf
  • 5,802
  • 1
  • 36
  • 48
Artem
  • 143
  • 2
  • 6
  • 1
    vw learns and predicts at the same time (online learning, streaming mode). Does this answer help? https://stackoverflow.com/a/30898578/1296044 – arielf Mar 16 '19 at 22:43
  • @arielf thank you for the comment. But I am afraid it's not what I need. I want to receive a detailed answer about how my java application can interoperate with vompal wabbit – Artem Mar 19 '19 at 10:35
  • 2
    This question seems to have some pointers to the Java API (jni): https://stackoverflow.com/questions/39294729/java-api-for-vowpal-wabbit Independently of this, `vw` is an online learner, not a batch learner, so you may learn (update model) and predict at the same time. Options like "progress output" `-P 1` can help you get predictions in streaming mode (may need redirect of stderr so you can capture it). HTH. – arielf Mar 20 '19 at 00:00

0 Answers0