public abstract static class BaseDpLinearClassifier.Builder<T extends BasePythonClassifier> extends BasePythonClassifier.Builder<BaseDpLinearClassifier.Builder<T>,T>
modelName, workingDir| Constructor and Description |
|---|
Builder()
Instantiates a new Builder.
|
| Modifier and Type | Method and Description |
|---|---|
BaseDpLinearClassifier.Builder<T> |
batchSize(int batchSize)
Sets the number of samples in one batch.
|
BaseDpLinearClassifier.Builder<T> |
dpEpsilon(double dpEpsilon)
Sets the DP epsilon.
|
BaseDpLinearClassifier.Builder<T> |
gpu(boolean gpu)
Sets whether gpu is used.
|
BaseDpLinearClassifier.Builder<T> |
highMemory(boolean highMemory)
Sets whether high memory mode is used.
|
BaseDpLinearClassifier.Builder<T> |
learningRate(double learningRate)
Sets the learning rate.
|
BaseDpLinearClassifier.Builder<T> |
maxEpochs(int maxEpochs)
Sets the number of epochs.
|
BaseDpLinearClassifier.Builder<T> |
modelName(String name)
Set a model name.
|
BaseDpLinearClassifier.Builder<T> |
momentum(double momentum)
Sets the momentum.
|
BaseDpLinearClassifier.Builder<T> |
penaltyCoefficient(double penaltyCoefficient)
Sets the penaltyCoefficient value.
|
BaseDpLinearClassifier.Builder<T> |
radiusConstant(double radiusConstant)
Sets the radiusConstant value.
|
BaseDpLinearClassifier.Builder<T> |
regLambda(double regLambda)
Sets the regLambda value.
|
BaseDpLinearClassifier.Builder<T> |
sampleWeights(List<Double> sampleWeights)
Sets list of sample weights for each class type.
|
BaseDpLinearClassifier.Builder<T> |
sampleWeights(SampleWeightsType sampleWeights)
Sets sample weights.
|
BaseDpLinearClassifier.Builder<T> |
verbose(int verbose)
Sets verbose level.
|
build, createDefaultClassifierBridge, workingDirpublic BaseDpLinearClassifier.Builder<T> maxEpochs(int maxEpochs)
maxEpochs - the number of epochs to run for training (default: 1000)public BaseDpLinearClassifier.Builder<T> batchSize(int batchSize)
batchSize - the number of samples in one mini-batch of SGD (default: 0 (mini-batch is the entire data set))public BaseDpLinearClassifier.Builder<T> sampleWeights(SampleWeightsType sampleWeights)
sampleWeights - the sample weights (SampleWeightsType) (default: null)public BaseDpLinearClassifier.Builder<T> sampleWeights(List<Double> sampleWeights)
sampleWeights - the sample weightspublic BaseDpLinearClassifier.Builder<T> dpEpsilon(double dpEpsilon)
dpEpsilon - the decimal value that controls the strength of the privacy guarantees (default: 2)public BaseDpLinearClassifier.Builder<T> verbose(int verbose)
verbose - approximately how many informational messages to generate during training.
For example, a value of 2 means that informational messages will be logged at the halfway point and at the end of training (default: 1).public BaseDpLinearClassifier.Builder<T> gpu(boolean gpu)
gpu - flag to use gpu (default: false).public BaseDpLinearClassifier.Builder<T> highMemory(boolean highMemory)
highMemory - enable high memory mode where training data is kept on CPU memory and only the mini-batch data is sent
to GPU memory for training (default: false).public BaseDpLinearClassifier.Builder<T> momentum(double momentum)
momentum - the optimization coefficient (default: 0.0)public BaseDpLinearClassifier.Builder<T> learningRate(double learningRate)
learningRate - the learning rate (default: 1.0)public BaseDpLinearClassifier.Builder<T> radiusConstant(double radiusConstant)
radiusConstant - the value for the radius factor on which to project the weight parameters (default: 1.0).public BaseDpLinearClassifier.Builder<T> regLambda(double regLambda)
regLambda - the value for the L2 regularization parameter. Cannot be 0 in order for the L2 penalizer to make
the loss strongly convex (default: 1.0).public BaseDpLinearClassifier.Builder<T> penaltyCoefficient(double penaltyCoefficient)
penaltyCoefficient - the value for the penalty parameter C of the error term (default: 1.0).public BaseDpLinearClassifier.Builder<T> modelName(String name)
BasePythonClassifier.BuildermodelName in class BasePythonClassifier.Builder<BaseDpLinearClassifier.Builder<T extends BasePythonClassifier>,T extends BasePythonClassifier>name - the model name (String)Copyright © 2020. All rights reserved.