public class DefaultNetwork extends java.lang.Object implements NetworkModel
| Constructor and Description |
|---|
DefaultNetwork(java.util.ArrayList neuronWeights,
TopologyModel topology,
FunctionMetric distanceFunction,
FunctionLearn learnFunction,
FunctionActivate activationFunction)
Create network with specified topology, random weight from
defined interval and number of inputs
|
DefaultNetwork(int weightNumber,
double[] maxWeight,
TopologyModel topology,
FunctionMetric distanceFunction,
FunctionLearn learnFunction,
FunctionActivate activationFunction)
Create network with specified topology, random weight from
defined interval and number of inputs
|
DefaultNetwork(java.lang.String fileName,
TopologyModel topology,
java.lang.String separator,
FunctionMetric distanceFunction,
FunctionLearn learnFunction,
FunctionActivate activationFunction)
Create network with specified topology and parameters get from
specified file
|
| Modifier and Type | Method and Description |
|---|---|
int |
bestNeuronIndex(double[] inputVector)
Get the index of the best matching neuron for the input vector.
|
NeuronModel |
getNeuron(int neuronNumber)
Return specified by number neuron
|
int |
getNumbersOfNeurons()
Return number of neurons
|
TopologyModel |
getTopology()
Get topology reference
|
void |
networkToFile(java.lang.String fileName)
Save network into file
|
void |
setTopology(TopologyModel topology)
Set topology
|
java.lang.String |
toString()
Returns a string representation of the Coords object
|
public DefaultNetwork(java.util.ArrayList neuronWeights,
TopologyModel topology,
FunctionMetric distanceFunction,
FunctionLearn learnFunction,
FunctionActivate activationFunction)
throws java.lang.Exception
neuronWeights - array lists of weights for each neuron. Of type double[].
These are added as is and not changed.topology - TopologydistanceFunction - distance function.learnFunction - reference to learning functionactivationFunction - activation function.java.lang.Exception - any error.public DefaultNetwork(int weightNumber,
double[] maxWeight,
TopologyModel topology,
FunctionMetric distanceFunction,
FunctionLearn learnFunction,
FunctionActivate activationFunction)
throws java.lang.Exception
weightNumber - number of weights (inputs)maxWeight - array with specified max weight values. These are added as a random
value up to the allowed maximum.topology - TopologydistanceFunction - distance function.learnFunction - reference to learning functionactivationFunction - activation function.java.lang.Exception - any error.public DefaultNetwork(java.lang.String fileName,
TopologyModel topology,
java.lang.String separator,
FunctionMetric distanceFunction,
FunctionLearn learnFunction,
FunctionActivate activationFunction)
throws java.lang.Exception
fileName - File Nametopology - Topologyseparator - the data value separator.distanceFunction - distance function.learnFunction - reference to learning functionactivationFunction - activation function.java.lang.Exception - any error.public int bestNeuronIndex(double[] inputVector)
throws java.lang.Exception
bestNeuronIndex in interface NetworkModelinputVector - an input dataset vector.java.lang.Exception - any error.public NeuronModel getNeuron(int neuronNumber)
getNeuron in interface NetworkModelneuronNumber - neuron numberpublic int getNumbersOfNeurons()
getNumbersOfNeurons in interface NetworkModelpublic TopologyModel getTopology()
getTopology in interface NetworkModelTopologyModelpublic void setTopology(TopologyModel topology)
setTopology in interface NetworkModeltopology - Topologypublic java.lang.String toString()
toString in class java.lang.Objectpublic void networkToFile(java.lang.String fileName)
fileName - File Name