|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.persist.BasicPersistedObject
org.encog.neural.networks.BasicNetwork
org.encog.neural.networks.svm.SVMNetwork
public class SVMNetwork
This is a network that is backed by one or more Support Vector Machines (SVM). It is designed to function very similarly to an Encog neural network, and is largely interchangeable with an Encog neural network. The support vector machine supports several types. Regression is used when you want the network to predict a value, given the input. Function approximation is a good example of regression. Classification is used when you want the SVM to group the input data into one or more classes. Support Vector Machines typically have a single output. Neural networks can have multiple output neurons. To get around this issue, this class will create multiple SVM's if there is more than one output specified. Because a SVM is trained quite differently from a neural network, none of the neural network training classes will work. This class must be trained using SVMTrain.
| Field Summary |
|---|
| Fields inherited from class org.encog.neural.networks.BasicNetwork |
|---|
DEFAULT_CONNECTION_LIMIT, TAG_INPUT, TAG_LIMIT, TAG_OUTPUT |
| Constructor Summary | |
|---|---|
SVMNetwork(int inputCount,
int outputCount,
boolean regression)
Construct an SVM network. |
|
SVMNetwork(int inputCount,
int outputCount,
SVMType svmType,
KernelType kernelType)
Construct a SVM network. |
|
| Method Summary | |
|---|---|
NeuralData |
compute(NeuralData input)
Compute the output for the given input. |
NeuralData |
compute(NeuralData input,
NeuralOutputHolder useHolder)
Compute the output for the given input. |
Persistor |
createPersistor()
Create a persistor for this object. |
int |
getInputCount()
|
KernelType |
getKernelType()
|
svm_model[] |
getModels()
|
int |
getOutputCount()
|
svm_parameter[] |
getParams()
|
SVMType |
getSvmType()
|
svm_node[] |
makeSparse(NeuralData data)
Convert regular Encog NeuralData into the "sparse" data needed by an SVM. |
| Methods inherited from class org.encog.neural.networks.BasicNetwork |
|---|
addLayer, addLayer, calculateError, calculateNeuronCount, clearContext, clearLayerTags, clone, compute, determineWinner, dumpWeights, enableConnection, equals, equals, getLayer, getLayerTags, getLogic, getProperties, getPropertyDouble, getPropertyLong, getPropertyString, getStructure, getTags, getWeightMatrixSize, hashCode, isConnected, reset, setBiasActivation, setLogic, setProperty, setProperty, setProperty, tagLayer, toString, winner |
| Methods inherited from class org.encog.persist.BasicPersistedObject |
|---|
getCollection, getDescription, getName, setCollection, setDescription, setName |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.encog.neural.networks.Network |
|---|
getDescription, getName, setDescription, setName |
| Methods inherited from interface org.encog.persist.EncogPersistedObject |
|---|
getCollection, setCollection |
| Constructor Detail |
|---|
public SVMNetwork(int inputCount,
int outputCount,
SVMType svmType,
KernelType kernelType)
inputCount - The input count.outputCount - The output count.svmType - The type of SVM.kernelType - The SVM kernal type.
public SVMNetwork(int inputCount,
int outputCount,
boolean regression)
inputCount - The input count.outputCount - The output count.regression - True if this network is used for regression.| Method Detail |
|---|
public NeuralData compute(NeuralData input)
compute in interface Networkcompute in class BasicNetworkinput - The input to the SVM.
public NeuralData compute(NeuralData input,
NeuralOutputHolder useHolder)
compute in interface Networkcompute in class BasicNetworkinput - The input to the SVM.useHolder - The output holder to use.
public svm_node[] makeSparse(NeuralData data)
data - The data to convert.
public Persistor createPersistor()
createPersistor in interface NetworkcreatePersistor in interface EncogPersistedObjectcreatePersistor in class BasicNetworkpublic int getInputCount()
BasicNetwork
getInputCount in interface EngineMachineLearninggetInputCount in class BasicNetworkpublic int getOutputCount()
BasicNetwork
getOutputCount in interface EngineMachineLearninggetOutputCount in class BasicNetworkpublic svm_model[] getModels()
public svm_parameter[] getParams()
public KernelType getKernelType()
public SVMType getSvmType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||