Catalano.MachineLearning.Classification
Class SparseMulticlassSupportVectorMachine
- java.lang.Object
-
- Catalano.MachineLearning.Classification.SparseMulticlassSupportVectorMachine
-
- All Implemented Interfaces:
- java.io.Serializable
public class SparseMulticlassSupportVectorMachine extends java.lang.Object implements java.io.SerializableSparse Multiclass Support Vector Machine.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, double[] weight)Initializes a new instance of the SparseMulticlassSupportVectorMachine class.SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, double[] weight, SVM.Strategy strategy)Initializes a new instance of the SparseMulticlassSupportVectorMachine class.SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, int numberOfClasses)Initializes a new instance of the SparseMulticlassSupportVectorMachine class.SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, int numberOfClasses, SVM.Strategy strategy)Initializes a new instance of the SparseMulticlassSupportVectorMachine class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidFinish()Process support vectors until convergence.voidLearn(SparseArray[] input, int[] output)voidLearn(SparseArray input, int output)Online learn.intPredict(SparseArray feature)
-
-
-
Constructor Detail
-
SparseMulticlassSupportVectorMachine
public SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, int numberOfClasses)
Initializes a new instance of the SparseMulticlassSupportVectorMachine class.- Parameters:
kernel- Mercer kernel.c- Soft margin penalty parameter.numberOfClasses- Number of classes.
-
SparseMulticlassSupportVectorMachine
public SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, int numberOfClasses, SVM.Strategy strategy)
Initializes a new instance of the SparseMulticlassSupportVectorMachine class.- Parameters:
kernel- Mercer kernel.c- Soft margin penalty parameter.numberOfClasses- Number of classes.strategy- Strategy.
-
SparseMulticlassSupportVectorMachine
public SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, double[] weight)
Initializes a new instance of the SparseMulticlassSupportVectorMachine class.- Parameters:
kernel- Mercer kernel.c- Soft margin penalty parameter.weight- Class weight.
-
SparseMulticlassSupportVectorMachine
public SparseMulticlassSupportVectorMachine(IMercerKernel kernel, double c, double[] weight, SVM.Strategy strategy)
Initializes a new instance of the SparseMulticlassSupportVectorMachine class.- Parameters:
kernel- Mercer kernel.c- Soft margin penalty parameter.weight- Class weight.strategy- Strategy.
-
-
Method Detail
-
Learn
public void Learn(SparseArray[] input, int[] output)
-
Learn
public void Learn(SparseArray input, int output)
Online learn.- Parameters:
input- Feature.output- Label.
-
Predict
public int Predict(SparseArray feature)
-
Finish
public void Finish()
Process support vectors until convergence.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG