public class VowpalWabbitPredictor extends VowpalWabbit implements TcPredictor
| Constructor and Description |
|---|
VowpalWabbitPredictor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
executePrediction(List<String> command)
Takes an assembled command and executes it, the retrieved output is returned as string
|
static String |
executePredictionFromStdin(List<String> command,
String aDataString)
Performs a prediction where the feature information is provided as strng
|
static List<String> |
getTestCommand(File aTestFile,
File aModel,
File anOutputTargetFile) |
static List<String> |
getTestCommandForPredictionFromStdin(File aModel)
Builds a command that can be executed with a
ProcessBuilder, which calls the binary
with the provided model |
List<String> |
predict(File data,
File model)
Executes the binary with the provided model and data file.
|
String |
predict(String dataAsString,
File model)
Executes the binary with the provided model, the feature information are provided loaded into
a string which is provided via stdin
|
static String |
readProcessOutput(Process aProcess) |
assembleCommand, getExecutable, getPlatformDetector, uninstallExecutablepublic List<String> predict(File data, File model) throws Exception
predict in interface TcPredictordata - The feature filemodel - The model to be usedException - In case of errorspublic String predict(String dataAsString, File model) throws Exception
dataAsString - The string representation of the featuresmodel - The model to be usedException - In case of errorspublic static List<String> getTestCommandForPredictionFromStdin(File aModel) throws Exception
ProcessBuilder, which calls the binary
with the provided modelaModel - The model to be usedException - In case of errorspublic static String executePredictionFromStdin(List<String> command, String aDataString) throws Exception
command - The command that is executedaDataString - The feature file as stringException - In case of errorspublic static List<String> getTestCommand(File aTestFile, File aModel, File anOutputTargetFile) throws Exception
aTestFile - A file with the feature information for predictionaModel - The model to be usedanOutputTargetFile - Output targetException - In case of an exceptionpublic static void executePrediction(List<String> command) throws Exception
command - The command for executionException - In case of errorsCopyright © 2013–2019 Ubiquitous Knowledge Processing (UKP) Lab. All rights reserved.