|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--learn.BackProp
The BackProp
class implements the standard backward propagation
algorithm with momentum.
Field Summary | |
javax.swing.JTextArea |
textArea1
|
Constructor Summary | |
BackProp(java.lang.String name)
Creates a back propagation object with the given name. |
Method Summary | |
void |
adjustWeights()
Adjusts the weights and thresholds by computing and adding the delta for each. |
void |
computeError()
Starting at the output layer and working backward to the input layer, computes the following: the output layer errors and deltas based on the difference between the activations and the target values the squared errors used to calculate the average RMS error the hidden layer errors and deltas the input layer errors |
void |
computeOutputs()
Computes the outputs by doing a single forward pass through the network. |
void |
createNetwork(int numIn,
int numHidden,
int numOut)
Creates a backward propagation network with the specified architecture. |
void |
display_network()
Displays the relevant information for the network. |
double |
getAveRMSError()
Retrieves the average RMS error. |
java.util.Vector |
getData()
Retrieves the vector of data used for training or testing. |
DataSet |
getDataSet()
Returns the dataset for the Kohonen map. |
int |
getFieldsPerRec()
Retrieves the number of fields per record. |
double |
getLearnRate()
Retrieves the learn rate parameter. |
int |
getMode()
Retrieves the mode network control parameter. |
double |
getMomentum()
Retrieves the momentum parameter. |
int |
getNumRecs()
Retrieves the number of data records. |
double |
getPrediction(double[] inputRec)
For networks with single continuous outputs only, retrieve the prediction. |
double |
logistic(double sum)
Computes the activation value based on the given sum. |
void |
process()
Processes the network by reading the input values, computing the output and error values, and, if training, adjusting the weights. |
void |
readInputs()
Reads data from the train or test dataset into the activations of the input units. |
void |
reset()
Resets the network. |
void |
setData(java.util.Vector data)
Sets the vector of data used for training or testing. |
void |
setDataSet(DataSet dataset)
Sets the dataset for the back prop object. |
void |
setFieldsPerRec(int fieldsPerRec)
Sets the number of fields per record. |
void |
setMode(int mode)
Sets the mode network control parameter. |
void |
setNumRecs(int numRecs)
Sets the number of data records. |
void |
show_array(java.lang.String name,
double[] arr)
Displays an array of network data. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public transient javax.swing.JTextArea textArea1
Constructor Detail |
public BackProp(java.lang.String name)
name
- the String object that contains the name of the back prop objectMethod Detail |
public void setDataSet(DataSet dataset)
dataset
- the DataSet for this objectpublic DataSet getDataSet()
dataset
- the DataSet for the Kohonen mappublic void setNumRecs(int numRecs)
numRecs
- the number of data recordspublic int getNumRecs()
public void setFieldsPerRec(int fieldsPerRec)
fieldsPerRec
- the number of fields per recordpublic int getFieldsPerRec()
public void setData(java.util.Vector data)
data
- the Vector of test datapublic java.util.Vector getData()
public void setMode(int mode)
mode
- the mode network control parameter (0=train, 1=run)public int getMode()
public double getAveRMSError()
public double getLearnRate()
public double getMomentum()
public void show_array(java.lang.String name, double[] arr)
name
- the String name of the information being displayedarr
- the array to be displayedpublic void display_network()
public double logistic(double sum)
sum
- the double value which is the sum of the threshold and each
input activation multiplied by the corresponding input weightpublic void readInputs()
public void computeOutputs()
public void computeError()
public void adjustWeights()
public double getPrediction(double[] inputRec)
inputRec
- the double array of input recordpublic void process()
public void reset()
public void createNetwork(int numIn, int numHidden, int numOut)
numIn
- the number of input unitsnumHidden
- the number of hidden unitsnumOut
- the number of output units
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |