Package gov.nih.mipav.model.algorithms
Class Backpropagation.NeuralNetwork
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.Backpropagation.NeuralNetwork
-
- Enclosing class:
- Backpropagation
public class Backpropagation.NeuralNetwork extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<Backpropagation.Neuron[]>
hiddenLayers
private java.util.ArrayList<Backpropagation.Neuron>
inputLayer
private java.util.ArrayList<java.lang.Double[]>
inputs
private double
learningRate
private double
momentum
private java.util.ArrayList<java.lang.Double>
outputKinds
private java.util.ArrayList<Backpropagation.Neuron>
outputLayer
private java.util.Random
rand
-
Constructor Summary
Constructors Constructor Description NeuralNetwork(java.util.ArrayList<java.lang.Double[]> inputs, java.util.ArrayList<java.lang.Double> outputKinds, java.lang.String hidden, double momentum, double learningRate, double threshold, double minRange, double maxRange)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
activate()
private void
applyBackpropagation(java.lang.Double[] expectedOutput)
private java.lang.Double[]
getOutput()
int[]
getOutputKind(java.util.ArrayList<java.lang.Double[]> inputs, int maxSteps, double minError)
private java.lang.Double
getRandomNumber(java.lang.Double minRange, java.lang.Double maxRange)
private void
printAllWeights()
private void
printWeights(Backpropagation.Neuron n)
java.lang.String
run(int maxSteps, double minError)
private void
setInput(java.lang.Double[] inputs)
java.lang.String
test(java.util.ArrayList<java.lang.Double[]> inputs, int maxSteps, double minError)
-
-
-
Field Detail
-
rand
private final java.util.Random rand
-
inputLayer
private final java.util.ArrayList<Backpropagation.Neuron> inputLayer
-
hiddenLayers
private final java.util.ArrayList<Backpropagation.Neuron[]> hiddenLayers
-
outputLayer
private final java.util.ArrayList<Backpropagation.Neuron> outputLayer
-
momentum
private double momentum
-
learningRate
private double learningRate
-
inputs
private java.util.ArrayList<java.lang.Double[]> inputs
-
outputKinds
private java.util.ArrayList<java.lang.Double> outputKinds
-
-
Method Detail
-
getRandomNumber
private java.lang.Double getRandomNumber(java.lang.Double minRange, java.lang.Double maxRange)
-
setInput
private void setInput(java.lang.Double[] inputs)
-
getOutput
private java.lang.Double[] getOutput()
-
activate
private void activate()
-
applyBackpropagation
private void applyBackpropagation(java.lang.Double[] expectedOutput)
-
run
public java.lang.String run(int maxSteps, double minError)
-
test
public java.lang.String test(java.util.ArrayList<java.lang.Double[]> inputs, int maxSteps, double minError)
-
getOutputKind
public int[] getOutputKind(java.util.ArrayList<java.lang.Double[]> inputs, int maxSteps, double minError)
-
printAllWeights
private void printAllWeights()
-
printWeights
private void printWeights(Backpropagation.Neuron n)
-
-