SVM Multi-class Classification
Multiclass SVM aims to assign labels to instances by using support vector machines, where the labels are drawn from a finite set of several elements.
The implemented approach for doing so is to reduce the single multiclass problem into multiple binary classification problems via one-versus-all.
The one-versus-all approach is the process of building binary classifiers which distinguish between one of the labels and the rest.
The model keeps the pairs
<ClassLabel, SVMLinearBinaryClassificationModel> and it enables a prediction to be made for a given vector of features, in the following way:
SVMLinearMultiClassClassificationModel model = ...; double prediction = model.predict(observation);
Presently, Ignite supports the following parameters for
amountOfIterations- amount of outer SDCA algorithm iterations. (default value:
amountOfLocIterations- amount of local SDCA algorithm iterations. (default value:
lambda- regularization parameter (default value:
All properties will be propagated for each pair one-versus-all
// Set up the trainer SVMLinearMultiClassClassificationTrainer trainer = new SVMLinearMultiClassClassificationTrainer() .withAmountOfIterations(AMOUNT_OF_ITERATIONS) .withAmountOfLocIterations(AMOUNT_OF_LOC_ITERATIONS) .withLambda(LAMBDA); // Build the model SVMLinearMultiClassClassificationModel mdl = trainer.fit( datasetBuilder, featureExtractor, labelExtractor );