public static class LinearSupportVectorClassifier.Builder<B extends LinearSupportVectorClassifier.Builder,T extends LinearSupportVectorClassifier> extends BasePythonClassifier.Builder<LinearSupportVectorClassifier.Builder<B,T>,T>
modelName, workingDir| Constructor and Description |
|---|
Builder()
Instantiates a new Builder.
|
| Modifier and Type | Method and Description |
|---|---|
T |
build()
Build classifier.
|
B |
classWeight(ClassWeightType classWeight)
Sets class weight.
|
B |
dual(boolean dual)
Sets the algorithm to either solve the dual or primal optimization problem.
|
B |
fitIntercept(boolean fitIntercept)
Sets whether to calculate the intercept for this model.
|
B |
interceptScaling(double interceptScaling)
Sets the scaling coefficient of the synthetic features.
|
B |
lossFunction(LossFunctionType lossFunction)
Sets the loss function.
|
B |
maxIterations(int maxIterations)
Sets the maximum number of iterations to be run.
|
B |
modelName(String name)
Set a model name.
|
B |
multiClass(MultiClassType multiClass)
Sets the multi-class strategy if y contains more than two classes.
|
B |
penalty(PenaltyType penalty)
Sets the norm used in the penalization.
|
B |
penaltyCoefficient(double penaltyCoefficient)
Sets penalty coefficient of the error term.
|
B |
seed(Integer seed)
Sets the seed used by the random number generator.
|
B |
tolerance(double tolerance)
Sets the tolerance for stopping criteria.
|
B |
verbose(boolean verbose)
Sets whether verbose mode is used.
|
createDefaultClassifierBridge, workingDirpublic B penalty(PenaltyType penalty)
penalty - the penalty (PenaltyType) (default: PenaltyType.L2)public B lossFunction(LossFunctionType lossFunction)
lossFunction - the loss function (LossFunctionType) (default: LossFunctionType.SQUARED_HINGE)public B dual(boolean dual)
dual - the dual flag (default: true)public B tolerance(double tolerance)
tolerance - the tolerance (default: 1e-4)public B penaltyCoefficient(double penaltyCoefficient)
penaltyCoefficient - the penalty coefficient (default: 1.0)public B multiClass(MultiClassType multiClass)
multiClass - the multi class strategy (MultiClassType) (default: MultiClassType.OVR)public B fitIntercept(boolean fitIntercept)
fitIntercept - the fit intercept flag (default: true)public B interceptScaling(double interceptScaling)
interceptScaling - the scaling coefficient (default: 1.0)public B classWeight(ClassWeightType classWeight)
classWeight - the class weight (ClassWeightType) (default: null)public B seed(Integer seed)
seed - the seed (default: null)public B verbose(boolean verbose)
verbose - the verbose mode flag (default: false)public B maxIterations(int maxIterations)
maxIterations - the number of iterations (default: 1000)public B modelName(String name)
BasePythonClassifier.BuildermodelName in class BasePythonClassifier.Builder<LinearSupportVectorClassifier.Builder<B extends LinearSupportVectorClassifier.Builder,T extends LinearSupportVectorClassifier>,T extends LinearSupportVectorClassifier>name - the model name (String)public T build()
BasePythonClassifier.Builderbuild in class BasePythonClassifier.Builder<LinearSupportVectorClassifier.Builder<B extends LinearSupportVectorClassifier.Builder,T extends LinearSupportVectorClassifier>,T extends LinearSupportVectorClassifier>Copyright © 2020. All rights reserved.