public class MulticlassSupportVectorMachine extends java.lang.Object implements IClassifier, java.io.Serializable
| Constructor and Description |
|---|
MulticlassSupportVectorMachine(IMercerKernel kernel,
double c,
double[] weight)
Initializes a new instance of the MulticlassSupportVectorMachine class.
|
MulticlassSupportVectorMachine(IMercerKernel kernel,
double c,
double[] weight,
SVM.Strategy strategy)
Initializes a new instance of the MulticlassSupportVectorMachine class.
|
MulticlassSupportVectorMachine(IMercerKernel kernel,
double c,
int numberOfClasses)
Initializes a new instance of the MulticlassSupportVectorMachine class.
|
MulticlassSupportVectorMachine(IMercerKernel kernel,
double c,
int numberOfClasses,
SVM.Strategy strategy)
Initializes a new instance of the MulticlassSupportVectorMachine class.
|
| Modifier and Type | Method and Description |
|---|---|
IClassifier |
clone()
Clone of the object.
|
void |
Finish()
Process support vectors until convergence.
|
void |
Learn(DatasetClassification dataset)
Learn from a dataset.
|
void |
Learn(double[][] input,
int[] output)
Learn.
|
void |
Learn(double[] input,
int output)
Online learn.
|
int |
Predict(double[] feature)
Predict.
|
public MulticlassSupportVectorMachine(IMercerKernel kernel, double c, int numberOfClasses)
kernel - Mercer kernel.c - Soft margin penalty parameter.numberOfClasses - Number of classes.public MulticlassSupportVectorMachine(IMercerKernel kernel, double c, int numberOfClasses, SVM.Strategy strategy)
kernel - Mercer kernel.c - Soft margin penalty parameter.numberOfClasses - Number of classes.strategy - Strategy.public MulticlassSupportVectorMachine(IMercerKernel kernel, double c, double[] weight)
kernel - Mercer kernel.c - Soft margin penalty parameter.weight - Class weight.public MulticlassSupportVectorMachine(IMercerKernel kernel, double c, double[] weight, SVM.Strategy strategy)
kernel - Mercer kernel.c - Soft margin penalty parameter.weight - Class weight.strategy - Strategy.public void Learn(DatasetClassification dataset)
IClassifierLearn in interface IClassifierdataset - Dataset.public void Learn(double[][] input,
int[] output)
IClassifierLearn in interface IClassifierinput - Matrix of features.output - Labels.public void Learn(double[] input,
int output)
input - Feature.output - Label.public int Predict(double[] feature)
IClassifierPredict in interface IClassifierfeature - Feature.public IClassifier clone()
IClassifierclone in interface IClassifierclone in class java.lang.Objectpublic void Finish()