|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmarf.Classification.Classification
marf.Classification.NeuralNetwork.NeuralNetwork
Class NeuralNetwork
$Header: /cvsroot/marf/marf/src/marf/Classification/NeuralNetwork/NeuralNetwork.java,v 1.30 2004/04/20 16:38:18 mokhov Exp $
| Field Summary | |
static int |
DEFAULT_EPOCH_NUMBER
Default number of epoch iterations of 64 if none supplied |
static double |
DEFAULT_MIN_ERROR
Default minimum training error of 0.1 if none supplied |
static int |
DEFAULT_OUTPUT_NEURON_BITS
How many binary Neurons in the output layer. |
static double |
DEFAULT_TRAINING_CONSTANT
Default training constant of 1 if none supplied |
(package private) static java.lang.String |
JAXP_SCHEMA_LANGUAGE
JAXP 1.2 Schema |
(package private) static java.lang.String |
JAXP_SCHEMA_SOURCE
JAXP 1.2 Schem URL |
(package private) static java.lang.String |
outputEncoding
All output will use this encoding |
(package private) static java.lang.String |
W3C_XML_SCHEMA
XML 2001 Schema |
| Fields inherited from class marf.Classification.Classification |
oFeatureExtraction, oResult, oTrainingSet |
| Fields inherited from interface marf.Storage.StorageManager |
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_XML |
| Constructor Summary | |
NeuralNetwork(FeatureExtraction poFeatureExtraction)
NeuralNetwork Constructor |
|
| Method Summary | |
boolean |
classify()
Neural Network implementation of classification routine |
void |
commit()
Applies changes made to neurons on every net's layer |
void |
dump()
Dumps Neural Net to an XML file |
void |
dumpXML(java.lang.String filename)
Dumps Neural Network as XML file |
void |
generate(int piNumOfInputs,
int[] paiHiddenLayers,
int piNumOfOutputs)
Generates virgin net at random. |
double[] |
getRes()
Gets outputs of a neural network run |
static void |
indent(java.io.BufferedWriter bw,
int n)
Indents the output according to the requested tabulation. |
void |
initialize(java.lang.String filename,
boolean dtd)
Parses XML and produces NNet. |
void |
restore()
Restores Neural Net from an XML file |
boolean |
train()
Implementes training of Neural Net |
void |
train(double[] in,
int expected,
double trainconst)
Actual training of the net |
| Methods inherited from class marf.Classification.Classification |
getResult |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_OUTPUT_NEURON_BITS
public static final double DEFAULT_TRAINING_CONSTANT
1 if none supplied
public static final int DEFAULT_EPOCH_NUMBER
64 if none supplied
public static final double DEFAULT_MIN_ERROR
0.1 if none supplied
static final java.lang.String outputEncoding
static final java.lang.String JAXP_SCHEMA_LANGUAGE
static final java.lang.String W3C_XML_SCHEMA
static final java.lang.String JAXP_SCHEMA_SOURCE
| Constructor Detail |
public NeuralNetwork(FeatureExtraction poFeatureExtraction)
poFeatureExtraction - FeatureExtraction module reference| Method Detail |
public final boolean train()
throws ClassificationException
train in class Classificationtrue
ClassificationException
public final boolean classify()
throws ClassificationException
classify in class Classificationtrue
ClassificationException
public final void initialize(java.lang.String filename,
boolean dtd)
throws java.io.IOException
java.io.IOExceptionpublic double[] getRes()
public static final void indent(java.io.BufferedWriter bw,
int n)
throws java.io.IOException
bw - Writer objectn - number of tabs
java.io.IOException
public final void dumpXML(java.lang.String filename)
throws java.io.IOException
filename - XML file name to write to
java.io.IOException
public final void generate(int piNumOfInputs,
int[] paiHiddenLayers,
int piNumOfOutputs)
throws ClassificationException
piNumOfInputs - number of input Neurons in the input layerpaiHiddenLayers - arrays of numbers of Neurons in the hidden layerspiNumOfOutputs - number of output Neurons in the output layer
ClassificationException
public final void train(double[] in,
int expected,
double trainconst)
throws ClassificationException
in - double[]expected - inttrainconst - double
ClassificationExceptionpublic final void commit()
public void dump()
throws java.io.IOException
dump in interface StorageManagerdump in class Classificationjava.io.IOException
public void restore()
throws java.io.IOException
restore in interface StorageManagerrestore in class Classificationjava.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||