org.encog.ml.svm
public class SVM extends BasicML implements MLRegression, MLClassification, MLError
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_C
The default C.
|
static int |
DEFAULT_CACHE_SIZE
The default cache size.
|
static int |
DEFAULT_COEF0
The default COEF0.
|
static int |
DEFAULT_DEGREE
The default degree.
|
static double |
DEFAULT_EPS
The default EPS.
|
static double |
DEFAULT_NU
The default NU.
|
static double |
DEFAULT_P
The default P.
|
| Constructor and Description |
|---|
SVM()
Construct the SVM.
|
SVM(int theInputCount,
boolean regression)
Construct an SVM network.
|
SVM(int theInputCount,
SVMType svmType,
KernelType kernelType)
Construct a SVM network.
|
SVM(svm_model theModel)
Construct a SVM from a model.
|
| Modifier and Type | Method and Description |
|---|---|
double |
calculateError(MLDataSet data)
Calculate the error for this SVM.
|
int |
classify(MLData input)
Classify the input into a group.
|
MLData |
compute(MLData input)
Compute the output for the given input.
|
int |
getInputCount() |
KernelType |
getKernelType() |
svm_model |
getModel() |
int |
getOutputCount() |
svm_parameter |
getParams() |
SVMType |
getSVMType() |
svm_node[] |
makeSparse(MLData data)
Convert regular Encog MLData into the "sparse" data needed by an SVM.
|
void |
setInputCount(int i)
Set the input count.
|
void |
setModel(svm_model theModel)
Set the model.
|
void |
updateProperties()
Not needed, no properties to update.
|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setPropertypublic static final int DEFAULT_DEGREE
public static final int DEFAULT_COEF0
public static final double DEFAULT_NU
public static final int DEFAULT_CACHE_SIZE
public static final int DEFAULT_C
public static final double DEFAULT_EPS
public static final double DEFAULT_P
public SVM()
public SVM(int theInputCount, boolean regression)
theInputCount - The input count.regression - True if this network is used for regression.public SVM(int theInputCount, SVMType svmType, KernelType kernelType)
theInputCount - The input count.svmType - The type of SVM.kernelType - The SVM kernal type.public SVM(svm_model theModel)
theModel - The model.public double calculateError(MLDataSet data)
calculateError in interface MLErrordata - The training set.public int classify(MLData input)
classify in interface MLClassificationinput - The input data to classify.public MLData compute(MLData input)
compute in interface MLRegressioninput - The input to the SVM.public int getInputCount()
getInputCount in interface MLInputpublic KernelType getKernelType()
public svm_model getModel()
public int getOutputCount()
getOutputCount in interface MLOutputpublic final svm_parameter getParams()
public SVMType getSVMType()
public svm_node[] makeSparse(MLData data)
data - The data to convert.public void setInputCount(int i)
i - The new input count.public void setModel(svm_model theModel)
theModel - The model.public void updateProperties()
updateProperties in interface MLPropertiesupdateProperties in class BasicMLCopyright © 2014. All Rights Reserved.