public static class VowpalWabbit.Builder extends Object implements SGDVowpalWabbitBuilder
Modifier and Type | Method and Description |
---|---|
VowpalWabbit.Builder |
active()
enable active learning
|
VowpalWabbit.Builder |
activeCover()
enable active learning with cover
|
VowpalWabbit.Builder |
adaptive()
use adaptive, individual learning rates.
|
VowpalWabbit.Builder |
affix(String arg)
generate prefixes/suffixes of features; argument '+2a,-3b,+1'
|
VowpalWabbit.Builder |
auditRegressor(Path regressor)
stores feature names and their regressor values.
|
VowpalWabbit.Builder |
autolink(int d)
create link function with polynomial d
|
VowpalWabbit.Builder |
bfgs()
use bfgs optimization
|
VowpalWabbit.Builder |
binary()
report loss as binary classification on -1,1
|
VowpalWabbit.Builder |
bitPrecision(int bitsNum)
number of bits in the feature table.
|
VowpalWabbit.Builder |
boosting(int n)
Online boosting with <N> weak learners
|
VowpalWabbit.Builder |
bootstrap(int k)
k-way bootstrap by online importance resampling
|
com.indeed.vw.wrapper.learner.VWFloatArrayLearner |
buildFloatArrayLearner() |
com.indeed.vw.wrapper.learner.VWFloatLearner |
buildFloatLearner()
Build learner
|
com.indeed.vw.wrapper.learner.VWIntArrayLearner |
buildIntArrayLearner() |
com.indeed.vw.wrapper.learner.VWIntLearner |
buildIntLearner() |
VowpalWabbit.Builder |
cache()
Use a cache.
|
VowpalWabbit.Builder |
cacheFile(Path cacheFile)
The location(s) of cacheFile.
|
VowpalWabbit.Builder |
cb(int k)
Use contextual bandit learning with <k> costs
|
VowpalWabbit.Builder |
cbAdf()
Do Contextual Bandit learning with multiline action dependent features.
|
VowpalWabbit.Builder |
cbExplore(int k)
Online explore-exploit for a <k> action contextual bandit problem
|
VowpalWabbit.Builder |
cbExploreAdf()
Online explore-exploit for a contextual bandit problem with multiline action dependent features
|
VowpalWabbit.Builder |
cbify(int k)
Convert multiclass on <k> classes into a contextual bandit problem
|
VowpalWabbit.Builder |
compressed()
use gzip format whenever possible.
|
VowpalWabbit.Builder |
confidence()
Get confidence for binary predictions
|
VowpalWabbit.Builder |
confidenceAfterTraining()
Confidence after training
|
VowpalWabbit.Builder |
conjugateGradient()
use conjugate gradient based optimization
|
VowpalWabbit.Builder |
constant(double initialValue)
Set initial value of constant
|
VowpalWabbit.Builder |
csoaa(int k)
One-against-all multiclass with <k> costs
|
VowpalWabbit.Builder |
csoaaLdf(VowpalWabbit.LDF ldf)
Use one-against-all multiclass learning with label dependent features.
|
VowpalWabbit.Builder |
cubic(String firstNameSpace,
String secondNamespace,
String thirdNamespace)
Create and use cubic features
|
VowpalWabbit.Builder |
decayLearningRate(double decay)
Set Decay factor for learning_rate between passes
|
VowpalWabbit.Builder |
dictionary(Path file)
read a dictionary for additional features (arg either 'x:file' or just 'file')
|
VowpalWabbit.Builder |
dictionaryPath(Path dir)
look in this directory for dictionaries; defaults to current directory or env{PATH}
|
VowpalWabbit.Builder |
earlyTerminate(int passes)
Specify the number of passes tolerated when holdout loss doesn't decrease before early termination, default is 3
|
VowpalWabbit.Builder |
ect(int k)
Error correcting tournament with <k> labels
|
VowpalWabbit.Builder |
examples(int examples)
number of examples to parse
|
VowpalWabbit.Builder |
featureLimit(int n)
limit to N features.
|
VowpalWabbit.Builder |
featureMask(Path featureMask)
Use existing regressor to determine which parameters may be updated.
|
VowpalWabbit.Builder |
finalRegressor(Path regressor)
Final regressor
|
VowpalWabbit.Builder |
ftrl()
FTRL: Follow the Proximal Regularized Leader
|
String |
getCommand()
Get command option will be passes to VWLearner
|
VowpalWabbit.Builder |
hash(VowpalWabbit.Hash hash)
how to hash the features.
|
VowpalWabbit.Builder |
holdoutAfter(int n)
holdout after n training examples, default off (disables holdoutPeriod)
|
VowpalWabbit.Builder |
holdoutPeriod(int holdout)
holdout period for test only, default 10
|
VowpalWabbit.Builder |
id(String id)
User supplied ID embedded into the final regressor
|
VowpalWabbit.Builder |
ignore(String namespace)
ignore namespace <arg>
|
VowpalWabbit.Builder |
initialPassLength(int examples)
initial number of examples per pass
|
VowpalWabbit.Builder |
initialRegressor(Path initialRegressor)
Initial regressor(s)
|
VowpalWabbit.Builder |
initialT(double initialT)
initial t value
|
VowpalWabbit.Builder |
initialWeight(double weight)
Set all weights to an initial value of arg.
|
VowpalWabbit.Builder |
inputFeatureRegularizer(Path regularizationPath)
Per feature regularization input file
|
VowpalWabbit.Builder |
interact(String arg)
Put weights on feature products from namespaces <n1> and <n2>
|
VowpalWabbit.Builder |
interactions(String... namespaces)
Create feature interactions of any level between namespaces.
|
VowpalWabbit.Builder |
invariant()
use safe/importance aware updates.
|
VowpalWabbit.Builder |
keep(String namespace)
keep namespace <arg>
|
VowpalWabbit.Builder |
killCache()
do not reuse existing cache: create a new one always
|
VowpalWabbit.Builder |
ksvm()
kernel svm
|
VowpalWabbit.Builder |
l1(double l1)
l_1 lambda
|
VowpalWabbit.Builder |
l2(double l2)
l_2 lambda
|
VowpalWabbit.Builder |
lda(int topics)
Run lda with <int> topics
|
VowpalWabbit.Builder |
learningRate(double learningRate)
Set learning rate
|
VowpalWabbit.Builder |
leaveDuplicateInteractions()
Don't remove interactions with duplicate combinations of namespaces.
|
VowpalWabbit.Builder |
link(Link link)
Specify the link function: identity, logistic, glf1 or poisson (=identity)
|
VowpalWabbit.Builder |
logMulti(int k)
Use online tree for multiclass
|
VowpalWabbit.Builder |
lossFunction(Loss loss)
Specify the loss function to be used, uses squared by default.
|
VowpalWabbit.Builder |
lrq(String firstNamespace,
String secondNamespace,
int k)
use low rank quadratic features
|
VowpalWabbit.Builder |
lrqdropout()
use dropout training for low rank quadratic features
|
VowpalWabbit.Builder |
lrqfa(String firstNamespace,
String secondNamespace,
int k)
use low rank quadratic features with field aware weights
|
VowpalWabbit.Builder |
maxPrediction(double max)
Largest prediction to output
|
VowpalWabbit.Builder |
minPrediction(double min)
Smallest prediction to output
|
VowpalWabbit.Builder |
multilabelOaa(int k)
One-against-all multilabel with <k> labels
|
VowpalWabbit.Builder |
multiworldTest(String arg)
Evaluate features as a policies
|
VowpalWabbit.Builder |
namedLabels(String... labels)
use names for labels (multiclass, etc.) rather than integers, argument specified all possible labels, comma-sep,
|
VowpalWabbit.Builder |
newMf(int rank)
rank for reduction-based matrix factorization
|
VowpalWabbit.Builder |
ngram(String namespace,
int n)
Generate N grams.
|
VowpalWabbit.Builder |
nn(int units)
Sigmoidal feedforward network with <k> hidden units
|
VowpalWabbit.Builder |
noconstant()
Don't add a constant feature
|
VowpalWabbit.Builder |
noop()
do no learning
|
VowpalWabbit.Builder |
normalized()
use per feature normalized updates
|
VowpalWabbit.Builder |
oaa(int k)
One-against-all multiclass with <k> labels
|
VowpalWabbit.Builder |
ojaNewton()
Online Newton with Oja's Sketch
|
VowpalWabbit.Builder |
outputFeatureRegularizerBinary(Path regularizationFile)
Per feature regularization output file
|
VowpalWabbit.Builder |
outputFeatureRegularizerText(Path regularizationFile)
Per feature regularization output file, in text
|
VowpalWabbit.Builder |
parameter(String argumentLine)
Add vowpal wabit argument
|
VowpalWabbit.Builder |
passes(int passes)
Number of Training Passes
|
VowpalWabbit.Builder |
permutations()
Use permutations instead of combinations for feature interactions of same namespace.
|
VowpalWabbit.Builder |
pistol()
FTRL: Parameter-free Stochastic Learning
|
VowpalWabbit.Builder |
powerT(double powerT)
t power value
|
VowpalWabbit.Builder |
quadratic(String firstNameSpace,
String secondNamespace)
Create and use quadratic features
|
VowpalWabbit.Builder |
quantileTau(double tau)
Parameter \tau associated with Quantile loss.
|
VowpalWabbit.Builder |
randomSeed(int seed)
seed random number generator
|
VowpalWabbit.Builder |
randomWeights(double arg)
make initial weights random
|
VowpalWabbit.Builder |
rank(int rank)
rank for matrix factorization.
|
VowpalWabbit.Builder |
readableModel(Path model)
Output human-readable final regressor with numeric features
|
VowpalWabbit.Builder |
recallTree(int k)
Use online tree for multiclass
|
VowpalWabbit.Builder |
redefine(String newNamespace,
String... namespaces)
redefine namespaces beginning with characters of string S as namespace N.
|
VowpalWabbit.Builder |
replayB(String arg)
use experience replay at a specified level
|
VowpalWabbit.Builder |
replayC(String arg)
use experience replay at a specified level
|
VowpalWabbit.Builder |
replayM(String arg)
use experience replay at a specified level
|
VowpalWabbit.Builder |
ringSize(int ringSize)
size of example ring buffer
|
VowpalWabbit.Builder |
savePerPass()
Save the model after every pass over data
|
VowpalWabbit.Builder |
saveResume()
save extra state so learning can be resumed later with new data
|
VowpalWabbit.Builder |
search(int maxActionID)
Use learning to search, argument=maximum action id or 0 for LDF
|
VowpalWabbit.Builder |
sgd()
use regular stochastic gradient descent update.
|
VowpalWabbit.Builder |
skips(String namespace,
int n)
Generate skips in N grams.
|
VowpalWabbit.Builder |
sortFeatures()
turn this on to disregard order in which features have been defined.
|
VowpalWabbit.Builder |
sparseL2(double l2)
use per feature normalized updates (=0)
|
VowpalWabbit.Builder |
spelling(String namespace)
compute spelling features for a give namespace (use '_' for default namespace)
|
VowpalWabbit.Builder |
stagePoly()
use stagewise polynomial feature learning
|
VowpalWabbit.Builder |
svrg()
Streaming Stochastic Variance Reduced Gradient
|
VowpalWabbit.Builder |
testonly()
Ignore label information and just test
|
VowpalWabbit.Builder |
top(int k)
top k recommendation
|
VowpalWabbit.Builder |
verbose()
Make vowpal wabbit writing debug and performance information to stderr
|
VowpalWabbit.Builder |
wapLdf(VowpalWabbit.LDF ldf)
Use weighted all-pairs multiclass learning with label dependent features.
|
public VowpalWabbit.Builder verbose()
verbose
in interface DebuggingOptions
public VowpalWabbit.Builder randomSeed(int seed)
randomSeed
in interface MiscOptions
seed
- random generator seedpublic VowpalWabbit.Builder ringSize(int ringSize)
ringSize
- size of example ringpublic VowpalWabbit.Builder learningRate(double learningRate)
learningRate
in interface UpdatesOptions
learningRate
- learningRate learning rate. Must be positivepublic VowpalWabbit.Builder powerT(double powerT)
powerT
- t power valuepublic VowpalWabbit.Builder decayLearningRate(double decay)
decay
- exponential decaypublic VowpalWabbit.Builder initialT(double initialT)
initialT
- initial t valuepublic VowpalWabbit.Builder featureMask(Path featureMask)
If no initialRegressor given, also used for initial weights.
featureMask
in interface FeatureSelectionOptions
featureMask
- path where to read feature maskpublic VowpalWabbit.Builder initialRegressor(Path initialRegressor)
initialRegressor
in interface OptionsToSaveAndLoadModel
initialRegressor
- path where to read initial regressorpublic VowpalWabbit.Builder initialWeight(double weight)
weight
- initial weight valuepublic VowpalWabbit.Builder randomWeights(double arg)
arg
- random maximumpublic VowpalWabbit.Builder inputFeatureRegularizer(Path regularizationPath)
regularizationPath
- path to regularization input filepublic VowpalWabbit.Builder hash(VowpalWabbit.Hash hash)
hash
- hash strategypublic VowpalWabbit.Builder ignore(String namespace)
namespace
- namespace namepublic VowpalWabbit.Builder keep(String namespace)
namespace
- namespace namepublic VowpalWabbit.Builder redefine(String newNamespace, String... namespaces)
<arg> shall be in form 'N:=S' where := is operator. Empty N or S are treated as default namespace.
Use ':' as a wildcard in S.
newNamespace
- new namespace namenamespaces
- old namespaces namespublic VowpalWabbit.Builder bitPrecision(int bitsNum)
It mean feature table will have 2^bitsNum size
bitPrecision
in interface OptionToExchangeRAMForQuality
bitsNum
- bitsNum number of bits in hash feature table.public VowpalWabbit.Builder noconstant()
noconstant
in interface FeatureEngineeringFunctions
public VowpalWabbit.Builder constant(double initialValue)
constant
in interface FeatureEngineeringFunctions
initialValue
- bias initial valuepublic VowpalWabbit.Builder ngram(String namespace, int n)
ngram
in interface FeatureEngineeringFunctions
namespace
- namespace name, or ':' for any namespacesn
- size of n-gram.public VowpalWabbit.Builder skips(String namespace, int n)
To generate n-skips for a single namespace 'foo', arg should be fN.
skips
in interface FeatureEngineeringFunctions
namespace
- namespace name, or ':' for any namespacesn
- size of skips n-gram.public VowpalWabbit.Builder featureLimit(int n)
n
- number of featurespublic VowpalWabbit.Builder affix(String arg)
means generate 2-char prefixes for namespace a, 3-char suffixes for b and 1 char
prefixes for default namespace
arg
- argumentpublic VowpalWabbit.Builder spelling(String namespace)
namespace
- namespacepublic VowpalWabbit.Builder dictionary(Path file)
file
- dictionary pathpublic VowpalWabbit.Builder dictionaryPath(Path dir)
dir
- dictionaries directory pathpublic VowpalWabbit.Builder interactions(String... namespaces)
namespaces
- namspacespublic VowpalWabbit.Builder permutations()
public VowpalWabbit.Builder leaveDuplicateInteractions()
For ex. this is a duplicate: '-q ab -q ba' and a lot more in '-q ::'.
public VowpalWabbit.Builder quadratic(String firstNameSpace, String secondNamespace)
quadratic
in interface FeatureEngineeringFunctions
firstNameSpace
- namespace or ":" for anysecondNamespace
- namespace or ":" for anypublic VowpalWabbit.Builder cubic(String firstNameSpace, String secondNamespace, String thirdNamespace)
cubic
in interface FeatureEngineeringFunctions
firstNameSpace
- namespace or ":" for anysecondNamespace
- namespace or ":" for anythirdNamespace
- namespace or ":" for anypublic VowpalWabbit.Builder testonly()
testonly
in interface MiscOptions
public VowpalWabbit.Builder holdoutPeriod(int holdout)
holdout
- holdout period sizepublic VowpalWabbit.Builder holdoutAfter(int n)
n
- number of examples in hodoutpublic VowpalWabbit.Builder earlyTerminate(int passes)
passes
- number of passespublic VowpalWabbit.Builder passes(int passes)
passes
- number of passespublic VowpalWabbit.Builder initialPassLength(int examples)
examples
- number of examples per passpublic VowpalWabbit.Builder examples(int examples)
examples
- number of examples to parsepublic VowpalWabbit.Builder minPrediction(double min)
minPrediction
in interface PredictionBoundaryOptions
min
- minimum prediction, includingpublic VowpalWabbit.Builder maxPrediction(double max)
maxPrediction
in interface PredictionBoundaryOptions
max
- maximum prediction, includingpublic VowpalWabbit.Builder sortFeatures()
public VowpalWabbit.Builder lossFunction(Loss loss)
squared, classic, hinge, logistic, quantile and poisson. (=squared)
lossFunction
in interface LinkAndLossOptions
loss
- loss functionpublic VowpalWabbit.Builder quantileTau(double tau)
quantileTau
in interface LinkAndLossOptions
tau
- tau parameterpublic VowpalWabbit.Builder l1(double l1)
l1
in interface RegularizationOptions
l1
- l1 regularization. Must be not negativepublic VowpalWabbit.Builder l2(double l2)
l2
in interface RegularizationOptions
l2
- l2 regularization. Must be not negativepublic VowpalWabbit.Builder namedLabels(String... labels)
eg "--namedLabels Noun,Verb,Adj,Punc"
labels
- labelspublic VowpalWabbit.Builder finalRegressor(Path regressor)
finalRegressor
in interface OptionsToSaveAndLoadModel
regressor
- path where to store final regressorpublic VowpalWabbit.Builder readableModel(Path model)
readableModel
in interface DebuggingOptions
model
- path where to store readable modelpublic VowpalWabbit.Builder saveResume()
public VowpalWabbit.Builder savePerPass()
public VowpalWabbit.Builder outputFeatureRegularizerBinary(Path regularizationFile)
regularizationFile
- path where to store regularization output filepublic VowpalWabbit.Builder outputFeatureRegularizerText(Path regularizationFile)
regularizationFile
- path where to store regularization output filepublic VowpalWabbit.Builder id(String id)
id
- model idpublic VowpalWabbit.Builder auditRegressor(Path regressor)
Same dataset must be used for both regressor training and this mode.
regressor
- path where to read regressor for auditpublic VowpalWabbit.Builder bootstrap(int k)
k
- number of bootstrap resamplespublic VowpalWabbit.Builder search(int maxActionID)
maxActionID
- max action idpublic VowpalWabbit.Builder replayC(String arg)
[b=classification/regression, m=multiclass, c=cost sensitive] with specified buffer size
arg
- argumentpublic VowpalWabbit.Builder cbify(int k)
k
- number of classespublic VowpalWabbit.Builder cbExploreAdf()
public VowpalWabbit.Builder cbExplore(int k)
k
- number of actionspublic VowpalWabbit.Builder multiworldTest(String arg)
arg
- argumentpublic VowpalWabbit.Builder cbAdf()
public VowpalWabbit.Builder cb(int k)
k
- number of costspublic VowpalWabbit.Builder csoaaLdf(VowpalWabbit.LDF ldf)
ldf
- ldfpublic VowpalWabbit.Builder wapLdf(VowpalWabbit.LDF ldf)
ldf
- ldfpublic VowpalWabbit.Builder interact(String arg)
arg
- argumentpublic VowpalWabbit.Builder csoaa(int k)
k
- number of costspublic VowpalWabbit.Builder multilabelOaa(int k)
k
- number of labelspublic VowpalWabbit.Builder recallTree(int k)
k
- number of classespublic VowpalWabbit.Builder logMulti(int k)
k
- number of classespublic VowpalWabbit.Builder ect(int k)
k
- number of labelspublic VowpalWabbit.Builder boosting(int n)
n
- number of weak learnerspublic VowpalWabbit.Builder oaa(int k)
k
- number of classespublic VowpalWabbit.Builder top(int k)
k
- number of top recomendationspublic VowpalWabbit.Builder replayM(String arg)
[b=classification/regression, m=multiclass, c=cost sensitive] with specified buffer size
arg
- argumentpublic VowpalWabbit.Builder binary()
public VowpalWabbit.Builder link(Link link)
link
in interface LinkAndLossOptions
link
- link functionpublic VowpalWabbit.Builder stagePoly()
public VowpalWabbit.Builder lrqfa(String firstNamespace, String secondNamespace, int k)
lrqfa
in interface FeatureEngineeringFunctions
firstNamespace
- - namespace or ":" for anysecondNamespace
- - namespace or ":" for anyk
- factorized matrices widthpublic VowpalWabbit.Builder lrq(String firstNamespace, String secondNamespace, int k)
firstNamespace
- - namespace or ":" for anysecondNamespace
- - namespace or ":" for anyk
- factorized matrices widthpublic VowpalWabbit.Builder lrqdropout()
public VowpalWabbit.Builder autolink(int d)
d
- polynomial degreepublic VowpalWabbit.Builder newMf(int rank)
rank
- rankpublic VowpalWabbit.Builder nn(int units)
units
- number of hidden unitspublic VowpalWabbit.Builder confidenceAfterTraining()
public VowpalWabbit.Builder confidence()
public VowpalWabbit.Builder activeCover()
public VowpalWabbit.Builder active()
public VowpalWabbit.Builder replayB(String arg)
[b=classification/regression, m=multiclass, c=cost sensitive] with specified buffer size
arg
- argumentpublic VowpalWabbit.Builder ojaNewton()
public VowpalWabbit.Builder bfgs()
public VowpalWabbit.Builder conjugateGradient()
public VowpalWabbit.Builder lda(int topics)
topics
- number of lda topicspublic VowpalWabbit.Builder noop()
public VowpalWabbit.Builder rank(int rank)
rank
- rank for matrix factorizationpublic VowpalWabbit.Builder svrg()
public VowpalWabbit.Builder ftrl()
ftrl
in interface FeatureSelectionOptions
public VowpalWabbit.Builder pistol()
public VowpalWabbit.Builder ksvm()
public VowpalWabbit.Builder sgd()
sgd
in interface UpdatesOptions
public VowpalWabbit.Builder adaptive()
adaptive
in interface UpdatesOptions
public VowpalWabbit.Builder invariant()
invariant
in interface UpdatesOptions
public VowpalWabbit.Builder normalized()
normalized
in interface UpdatesOptions
public VowpalWabbit.Builder sparseL2(double l2)
l2
- l2 regularization. Must be not negativepublic VowpalWabbit.Builder cache()
public VowpalWabbit.Builder cacheFile(Path cacheFile)
cacheFile
- path to cache filepublic VowpalWabbit.Builder killCache()
public VowpalWabbit.Builder compressed()
this option creates a compressed cache file.
A mixture of raw-text and compressed inputs are supported with autodetection.
public VowpalWabbit.Builder parameter(String argumentLine)
argumentLine
- parameter linepublic String getCommand()
public com.indeed.vw.wrapper.learner.VWFloatLearner buildFloatLearner()
SGDVowpalWabbitBuilder
buildFloatLearner
in interface SGDVowpalWabbitBuilder
public com.indeed.vw.wrapper.learner.VWIntLearner buildIntLearner()
public com.indeed.vw.wrapper.learner.VWFloatArrayLearner buildFloatArrayLearner()
public com.indeed.vw.wrapper.learner.VWIntArrayLearner buildIntArrayLearner()
Copyright © 2017. All rights reserved.