public class SVMLinearClassificationTrainer extends SingleLabelDatasetTrainer<SVMLinearClassificationModel>
This trainer takes input as Labeled Dataset with 0 and 1 labels for two classes and makes binary classification.
The paper about this algorithm could be found here https://arxiv.org/abs/1409.1458.DatasetTrainer.EmptyDatasetException
envBuilder, environment
Constructor and Description |
---|
SVMLinearClassificationTrainer() |
Modifier and Type | Method and Description |
---|---|
<K,V> SVMLinearClassificationModel |
fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> preprocessor)
Trains model based on the specified data.
|
int |
getAmountOfIterations()
Get the amount of outer iterations of SCDA algorithm.
|
int |
getAmountOfLocIterations()
Get the amount of local iterations of SCDA algorithm.
|
double |
getLambda()
Get the regularization lambda.
|
long |
getSeed()
Get the seed number.
|
boolean |
isUpdateable(SVMLinearClassificationModel mdl) |
protected <K,V> SVMLinearClassificationModel |
updateModel(SVMLinearClassificationModel mdl,
DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> preprocessor)
Trains new model taken previous one as a first approximation.
|
SVMLinearClassificationTrainer |
withAmountOfIterations(int amountOfIterations)
Set up the amount of outer iterations of SCDA algorithm.
|
SVMLinearClassificationTrainer |
withAmountOfLocIterations(int amountOfLocIterations)
Set up the amount of local iterations of SCDA algorithm.
|
SVMLinearClassificationTrainer |
withLambda(double lambda)
Set up the regularization parameter.
|
SVMLinearClassificationTrainer |
withSeed(long seed)
Set up the seed.
|
fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update, update, withConvertedLabels, withEnvironmentBuilder
public <K,V> SVMLinearClassificationModel fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> preprocessor)
fitWithInitializedDeployingContext
in class DatasetTrainer<SVMLinearClassificationModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.datasetBuilder
- Dataset builder.preprocessor
- Extractor of UpstreamEntry
into LabeledVector
.protected <K,V> SVMLinearClassificationModel updateModel(SVMLinearClassificationModel mdl, DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> preprocessor)
updateModel
in class DatasetTrainer<SVMLinearClassificationModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.mdl
- Learned model.datasetBuilder
- Dataset builder.preprocessor
- Extractor of UpstreamEntry
into LabeledVector
.public boolean isUpdateable(SVMLinearClassificationModel mdl)
isUpdateable
in class DatasetTrainer<SVMLinearClassificationModel,Double>
mdl
- Model.public SVMLinearClassificationTrainer withLambda(double lambda)
lambda
- The regularization parameter. Should be more than 0.0.public double getLambda()
public int getAmountOfIterations()
public SVMLinearClassificationTrainer withAmountOfIterations(int amountOfIterations)
amountOfIterations
- The parameter value.public int getAmountOfLocIterations()
public SVMLinearClassificationTrainer withAmountOfLocIterations(int amountOfLocIterations)
amountOfLocIterations
- The parameter value.public long getSeed()
public SVMLinearClassificationTrainer withSeed(long seed)
seed
- The parameter value.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024