|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--learn.KMapNet
The KMapNet
class provides the support necessary
for the Kohonen Map neural network.
Field Summary | |
javax.swing.JTextArea |
textArea1
|
Constructor Summary | |
KMapNet(java.lang.String name)
Creates a Kohonen map neural network with the given name. |
Method Summary | |
void |
adjustNeighborhood()
Adjusts the learn rate and neigborhood width (sigma) as training progresses. |
void |
adjustWeights()
Adjusts the weights of the units in the neighborhood of the winner using the neighborhood, the distance from the winning unit, and the learn rate. |
void |
cluster()
Trains or tests the network by setting the input unit activations, computing the outputs, selecting the winner, and, if in train mode, adjusting the weights. |
void |
computeDistances()
Initializes a matrix of distances from each unit to all others in the network. |
void |
computeOutputs()
Computes the outputs by doing a single forward pass through the network, computing the Euclidean distance from the input vector to all the output units. |
void |
createNetwork(int NumIn,
int NumRows,
int NumCols)
Creates a Kohonen map network with the specified architecture. |
void |
display_network()
Displays the relevant information for the network. |
int |
getCluster(double[] inputRec)
Selects a winner from a single input record. |
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. |
int |
getMode()
Retrieves the mode network control parameter. |
int |
getNumRecs()
Retrieves the number of data records. |
void |
readInputs()
Reads data from the train or test dataset into the activations of the input units. |
void |
reset()
Resets the network. |
void |
selectWinner()
Selects the winner by finding the unit with the smallest activation. |
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 Kohonen map. |
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 KMapNet(java.lang.String name)
name
- the String that contains the name of the networkMethod Detail |
public void setDataSet(DataSet dataset)
dataset
- the DataSet for the Kohonen mappublic 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 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 void readInputs()
public void computeDistances()
public void adjustNeighborhood()
public void computeOutputs()
public void selectWinner()
public void adjustWeights()
public int getCluster(double[] inputRec)
inputRec
- the double array which contains the input datapublic void cluster()
public void reset()
public void createNetwork(int NumIn, int NumRows, int NumCols)
numIn
- the number of input unitsnumRows
- the number of rowsnumCols
- the number of columnsNumIn
- the intNumRows
- the intNumCols
- the int
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |