|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCFOProblem
org.joone.structure.NetworkAsCFOProblem
public class NetworkAsCFOProblem
Describes the network as a oat CFOProblem. This class is used to transform a network into a optimisation problem, where the weights and potentially the initial states of the network are the domain of the problem and the network global error function the goal function.
Field Summary | |
---|---|
protected double[] |
current
The current network solution |
protected int |
cycleCount
Number of times that we've cycled through the network |
protected java.util.Set<javax.swing.event.ChangeListener> |
cycleListeners
Change listeners that are notified as the network completes a cycle |
protected NeuralNet |
network
The network we are optimising here |
protected java.lang.Object[] |
optimise
The array of objects that we need to optimise. |
protected double[][] |
preapreMinMax
The parameter ranges |
protected java.util.Random |
random
The random number generator to use when generating initial guesses |
protected double |
stdev
The standard deviation to use when generating initial guesses |
Constructor Summary | |
---|---|
NetworkAsCFOProblem(NeuralNet network,
boolean includeInitialStates)
Create a new problem based on the network |
Method Summary | |
---|---|
void |
addCycleListener(javax.swing.event.ChangeListener listener)
Add a new cycle listener |
double[][] |
getInitialGuess(int desiredCount)
A CFOProblem will typically create its own random initial guesses. |
java.lang.String |
getName()
Anyone has any better suggestions |
SUPPORTED_DIMENSIONS[] |
getSupportDimensionality()
This is multidimensional |
protected void |
init(NodesAndWeights nodesAndWeights,
boolean includeInitialStates)
Initialise |
boolean |
isMinimization()
Yebo |
protected double[][] |
preapreMinMax()
We leave this to the last, allowing the user to change the range for example |
protected double[][] |
preapreOptima()
We are also looking for this |
protected double |
problemSpecificCost(double[] v)
Run through one iteration of the network and return the global error |
void |
removeCycleListener(javax.swing.event.ChangeListener listener)
Remove the given cycle listener |
void |
setCurrent(double[] current)
Set the current solution to that contained in the array |
void |
useCurrent(double stdev,
java.util.Random random)
Use the current network weight and initial state values as an initial guess. |
void |
useRandom(double stdev,
java.util.Random random)
Use a random initial guess, generated using the given standard deviation and random number generator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Set<javax.swing.event.ChangeListener> cycleListeners
protected NeuralNet network
protected int cycleCount
protected java.lang.Object[] optimise
protected double[] current
protected double stdev
protected java.util.Random random
protected double[][] preapreMinMax
Constructor Detail |
---|
public NetworkAsCFOProblem(NeuralNet network, boolean includeInitialStates)
network
- the network we want to optimiseincludeInitialStates
- if true, the network's initial states, if any,
will form part of the problem and also be
optimisedMethod Detail |
---|
public void useCurrent(double stdev, java.util.Random random)
stdev
- the standard deviation to use when generating random initial guess
around the current network solutionrandom
- the random number generator to use to generate the initial guesses
withpublic void useRandom(double stdev, java.util.Random random)
stdev
- the standard deviation to use when generating random initial guessesrandom
- the random number generator to use to generate the initial guesses
withprotected void init(NodesAndWeights nodesAndWeights, boolean includeInitialStates)
nodesAndWeights
- the network's nodes and weightsincludeInitialStates
- if true, the network initial state is also optimisedpublic java.lang.String getName()
public SUPPORTED_DIMENSIONS[] getSupportDimensionality()
protected double[][] preapreMinMax()
protected double[][] preapreOptima()
public boolean isMinimization()
public double[][] getInitialGuess(int desiredCount)
protected double problemSpecificCost(double[] v)
public void addCycleListener(javax.swing.event.ChangeListener listener)
listener
- listener that will be notified when the network completes a cyclepublic void removeCycleListener(javax.swing.event.ChangeListener listener)
public void setCurrent(double[] current)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |