|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface INeuralNetwork
Defines methods required by a neural network.
| Method Summary | |
|---|---|
void |
addConnector(IConnector connector)
Add the given connector. |
void |
addLayer(ILayer layer)
Add the given layer. |
void |
adjustWeights(int fromLayer,
int toLayer,
double[][] deltas)
Adjust the given layer's weights by adding the given deltas. |
Object |
clone()
Return a clone of this instance. |
void |
configure(Properties properties)
Configure this object using the given properties. |
Iterator |
connectorIterator(String toLayerName)
Return an iterator over the collection of connectors with the given to layer. |
double[] |
evaluate(double[] inputs)
Apply the given inputs and return the output of the neural network. |
void |
fillWeights(double value)
Assign the given value to all weights of the neural network. |
IActivationFunction |
getActivationFunction(int layerIndex)
Return the activation function. |
Properties |
getConfiguration()
Return the configuration of this network. |
IConnector |
getConnector(int fromLayerIndex,
int toLayerIndex)
Return the connector for the given parameters. |
int |
getConnectorCount()
Return the number of connectors. |
IScaler |
getInputScaler()
Return the input scaler. |
ILayer |
getLayer(int index)
Return the layer at the given index. |
int |
getLayerCount()
Return the number of layers. |
int |
getMaxOutputValueIndex()
Return the index of the output node with the maximum value. |
double |
getNodeInput(int layer,
int i)
Return the node input value for the given parameters. |
double |
getNodeOutput(int layer,
int i)
Return the node output value for the given parameters. |
ILayer |
getOutputLayer()
Return the output layer. |
int |
getOutputLayerIndex()
Return the output layer index. |
double[] |
getOutputs()
Return the output layer node values. |
IScaler |
getOutputScaler()
Return the output scaler. |
double |
getWeight(int fromLayer,
int i,
int toLayer,
int j)
Return the weight for the given parameters. |
double[] |
getWeights(int fromLayer,
int i,
int toLayer)
Return the weights for the given parameters. |
int |
indexOf(ILayer layer)
Return the index of the given layer. |
boolean |
isConnected(ILayer fromLayer,
ILayer toLayer)
Return true if this network has a connector from the given layer to the given layer. |
boolean |
isConnected(int fromIndex,
int toIndex)
Return true if this network has a connector from the given layer to the given layer. |
void |
randomizeWeights()
Assign random weights to the neural network. |
void |
randomizeWeights(double range)
Assign random weights to the neural network. |
void |
setActivationFunction(IActivationFunction function)
Set the activation function for the all layers of the network. |
void |
setActivationFunction(int layer,
IActivationFunction function)
Set the activation function for the given layer index. |
void |
setInputs(double[] inputs)
Set the values of the input nodes. |
void |
setInputScaler(IScaler scaler)
Set the input scaler. |
void |
setNodeInput(int layer,
int i,
double value)
Set the node input value for the given parameters. |
void |
setOutputScaler(IScaler scaler)
Set the output scaler. |
void |
setWeight(int fromLayer,
int i,
int toLayer,
int j,
double weight)
Set the weight for the given parameters. |
void |
store(OutputStream outputStream)
Store the neural network to the given output stream. |
String |
toString()
Return a string representation of this object. |
void |
zeroWeights()
Assign zero weights to the neural network. |
| Method Detail |
|---|
void addConnector(IConnector connector)
connector - Connector.void addLayer(ILayer layer)
layer - Layer.
void adjustWeights(int fromLayer,
int toLayer,
double[][] deltas)
fromLayer - From layer index, where 0=input layer, and
layerCount-1=output layer.toLayer - To layer index, where 0=input layer, and
layerCount-1=output layer.deltas - Weight deltas for the given layer.Object clone()
void configure(Properties properties)
throws InstantiationException,
IllegalAccessException
InstantiationException
IllegalAccessExceptionIterator connectorIterator(String toLayerName)
toLayerName - To layer name.double[] evaluate(double[] inputs)
void fillWeights(double value)
IActivationFunction getActivationFunction(int layerIndex)
layerIndex - Layer index, where 0=input layer, and
layerCount-1=output layer.Properties getConfiguration()
IConnector getConnector(int fromLayerIndex,
int toLayerIndex)
fromLayerIndex - From layer index.toLayerIndex - To layer index.int getConnectorCount()
IScaler getInputScaler()
ILayer getLayer(int index)
int getLayerCount()
int getMaxOutputValueIndex()
double getNodeInput(int layer,
int i)
layer - Layer index, where 0=input layer, and layerCount-1=output
layer.i - Node index.
double getNodeOutput(int layer,
int i)
layer - Layer index, where 0=input layer, and layerCount-1=output
layer.i - Node index.ILayer getOutputLayer()
int getOutputLayerIndex()
double[] getOutputs()
IScaler getOutputScaler()
double getWeight(int fromLayer,
int i,
int toLayer,
int j)
fromLayer - From layer index, where 0=input layer, and
layerCount-1=output layer.i - From layer node index.toLayer - To layer index, where 0=input layer, and
layerCount-1=output layer.j - To layer node index.
double[] getWeights(int fromLayer,
int i,
int toLayer)
fromLayer - From layer index, where 0=input layer, and
layerCount-1=output layer.i - From layer node index.toLayer - To layer index, where 0=input layer, and
layerCount-1=output layer.int indexOf(ILayer layer)
boolean isConnected(int fromIndex,
int toIndex)
boolean isConnected(ILayer fromLayer,
ILayer toLayer)
void randomizeWeights()
void randomizeWeights(double range)
range - ±Range of random weights around zero.void setActivationFunction(IActivationFunction function)
void setActivationFunction(int layer,
IActivationFunction function)
layer - Layer index, where 0=input layer, and layerCount-1=output
layer.void setInputs(double[] inputs)
void setInputScaler(IScaler scaler)
void setNodeInput(int layer,
int i,
double value)
layer - Layer index, where 0=input layer, and layerCount-1=output
layer.i - Node index.void setOutputScaler(IScaler scaler)
void setWeight(int fromLayer,
int i,
int toLayer,
int j,
double weight)
fromLayer - From layer index, where 0=input layer, and
layerCount-1=output layer.i - From layer node index.toLayer - To layer index, where 0=input layer, and
layerCount-1=output layer.j - To layer node index.weight - New weight.
void store(OutputStream outputStream)
throws IOException
IOExceptionString toString()
toString in class Objectvoid zeroWeights()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |