I wrote Java code to execute Vowpal Wabbit as follows:
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.waitFor();
System.out.println("done");
}
where is the team
vw -d input.txt --loss_function = logistic -f model.vw
The disadvantage of this is that it requires writing to disk. After some searching, I found out that wowpal wabbit supports reading data from standard input.
Example in R
I could not find any examples for this in Java 1.8. Can anyone share this with me?
source
share