Class MultiClassRbfTrainer
java.lang.Object
org.tweetyproject.machinelearning.svm.MultiClassRbfTrainer
- All Implemented Interfaces:
Trainer<DefaultObservation,DoubleCategory>
public class MultiClassRbfTrainer
extends Object
implements Trainer<DefaultObservation,DoubleCategory>
Trains a standard multi-class RBF support vector machine.
- Author:
- Matthias Thimm
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TrainingParameterThe c parameter for learningstatic final TrainingParameterThe gamma parameter for learning -
Constructor Summary
ConstructorsConstructorDescriptionInitializes the trainer with the default parameters.MultiClassRbfTrainer(double c, double gamma) Initializes the trainer with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of parameters for this trainer.booleansetParameterSet(ParameterSet params) Sets the parameters for this trainer (calling this method must ensure that the next timetrain(TrainingSet<S,T> trainingSet)is used it uses these parameters.toString()train(TrainingSet<DefaultObservation, DoubleCategory> trainingSet) Trains a classifier on the given training set.train(TrainingSet<DefaultObservation, DoubleCategory> trainingSet, ParameterSet params) Trains a classifier on the given training set with the given parameters
-
Field Details
-
C_PARAMETER
The c parameter for learning -
GAMMA_PARAMETER
The gamma parameter for learning
-
-
Constructor Details
-
MultiClassRbfTrainer
public MultiClassRbfTrainer()Initializes the trainer with the default parameters. -
MultiClassRbfTrainer
public MultiClassRbfTrainer(double c, double gamma) Initializes the trainer with the given parameters.- Parameters:
c- the c parameter for learninggamma- the gamma parameter for learning
-
-
Method Details
-
train
Description copied from interface:TrainerTrains a classifier on the given training set.- Specified by:
trainin interfaceTrainer<DefaultObservation,DoubleCategory> - Parameters:
trainingSet- some training set.- Returns:
- a classifier
-
train
public SupportVectorMachine train(TrainingSet<DefaultObservation, DoubleCategory> trainingSet, ParameterSet params) Description copied from interface:TrainerTrains a classifier on the given training set with the given parameters- Specified by:
trainin interfaceTrainer<DefaultObservation,DoubleCategory> - Parameters:
trainingSet- some training set.params- parameters for the training.- Returns:
- a classifier
-
getParameterSet
Description copied from interface:TrainerReturns the set of parameters for this trainer.- Specified by:
getParameterSetin interfaceTrainer<DefaultObservation,DoubleCategory> - Returns:
- the set of parameters for this trainer.
-
setParameterSet
Description copied from interface:TrainerSets the parameters for this trainer (calling this method must ensure that the next timetrain(TrainingSet<S,T> trainingSet)is used it uses these parameters.- Specified by:
setParameterSetin interfaceTrainer<DefaultObservation,DoubleCategory> - Parameters:
params- a parameter set.- Returns:
- true if the operation was successful.
-
toString
-