|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mov.analyser.ann.ArtificialNeuralNetwork
public class ArtificialNeuralNetwork
Field Summary | |
---|---|
static double |
HIGH_BOOL
|
static double |
LOW_BOOL
|
static int |
OUTPUT_BUY
|
static int |
OUTPUT_NEURONS
|
static int |
OUTPUT_SELL
|
Constructor Summary | |
---|---|
ArtificialNeuralNetwork(javax.swing.JDesktopPane desktop)
Create a new instance of ArtificialNeuralNetwork class. |
Method Summary | |
---|---|
void |
cicleTerminated(org.joone.engine.NeuralNetEvent e)
|
void |
errorChanged(org.joone.engine.NeuralNetEvent e)
|
boolean |
isANNNull()
Return true if nnet neural network is null or if it has no valid input/output layers. |
boolean |
isInputOK(int inputRows)
Check if the actual neural network has the same of input neurons as given. |
boolean |
isOutputOK()
Check if the actual neural network has a number of output neurons as desired. |
boolean |
isSaved()
Get the network status (saved/not saved). |
void |
loadNeuralNet(java.lang.String fileName)
Load the neural network from a snet/xml file into the nnet object. |
void |
netStarted(org.joone.engine.NeuralNetEvent e)
|
void |
netStopped(org.joone.engine.NeuralNetEvent e)
|
void |
netStoppedError(org.joone.engine.NeuralNetEvent e,
java.lang.String error)
|
boolean[] |
run(double[] inputDoubles)
Run the current nnet neural network. |
void |
runTraining(double[][] inputArray,
double[][] outputDesiredArray,
double newLearningRate,
double newMomentum,
int newPreLearning,
int newTotCicles,
int newTrainingPatterns)
Trains the current nnet neural network. |
void |
saveNeuralNet(java.lang.String fileName)
Save the nnet neural network in a snet/xml file. |
void |
setANNInput(int inputRows)
Recalculate the inputs so that they fit with input expressions. |
void |
setANNNull()
Set the ANN to null. |
void |
setANNOutput()
Recalculate the outputs so that they fit with number of buy/sell signals. |
void |
setBuyThreshold(double buyThreshold)
Set the buy threshold. |
void |
setDefaultANN(int inputRows)
Set a default artificial neural network with the following characteristics: - input layer defined as LinearLayer (see Joone documentation for details) - hidden layer defined as SigmoidLayer (see Joone documentation for details) - output layer defined as SigmoidLayer (see Joone documentation for details). |
void |
setProgressBar(ProgressDialog progress)
Set the progress bar, so that we can manage it when cycle terminated event is raised. |
void |
setSellThreshold(double sellThreshold)
Set the sell threshold. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OUTPUT_BUY
public static final int OUTPUT_SELL
public static final int OUTPUT_NEURONS
public static final double HIGH_BOOL
public static final double LOW_BOOL
Constructor Detail |
---|
public ArtificialNeuralNetwork(javax.swing.JDesktopPane desktop)
desktop
- the desktopMethod Detail |
---|
public boolean[] run(double[] inputDoubles)
inputDoubles
- an array of input values of the artificial neural network
public void runTraining(double[][] inputArray, double[][] outputDesiredArray, double newLearningRate, double newMomentum, int newPreLearning, int newTotCicles, int newTrainingPatterns)
inputArray
- an array of input values of the artificial neural networkoutputDesiredArray
- an array of desired output values
of the artificial neural networkpublic void setProgressBar(ProgressDialog progress)
progress
- the progress bar shown to the user during training.public void setANNNull()
public boolean isANNNull()
public void setBuyThreshold(double buyThreshold)
buyThreshold
- the buy threshold.public void setSellThreshold(double sellThreshold)
sellThreshold
- the sell threshold.public boolean isSaved()
public void loadNeuralNet(java.lang.String fileName) throws FileExtensionException, java.io.FileNotFoundException, java.io.IOException, java.lang.NullPointerException, java.lang.SecurityException
fileName
- the file name where nnet will be saved
FileExtensionException
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerException
java.lang.SecurityException
public void saveNeuralNet(java.lang.String fileName) throws FileExtensionException, java.io.FileNotFoundException, java.io.IOException, java.lang.NullPointerException, java.lang.SecurityException
fileName
- the file name where nnet will be saved
FileExtensionException
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerException
java.lang.SecurityException
public void setDefaultANN(int inputRows)
inputRows
- the input of the neural networkpublic void setANNInput(int inputRows)
inputRows
- the inputs of the neural network to be setpublic void setANNOutput()
public boolean isInputOK(int inputRows)
inputRows
- number of input rows of ANN to be checked
public boolean isOutputOK()
public void cicleTerminated(org.joone.engine.NeuralNetEvent e)
cicleTerminated
in interface org.joone.engine.NeuralNetListener
public void errorChanged(org.joone.engine.NeuralNetEvent e)
errorChanged
in interface org.joone.engine.NeuralNetListener
public void netStarted(org.joone.engine.NeuralNetEvent e)
netStarted
in interface org.joone.engine.NeuralNetListener
public void netStopped(org.joone.engine.NeuralNetEvent e)
netStopped
in interface org.joone.engine.NeuralNetListener
public void netStoppedError(org.joone.engine.NeuralNetEvent e, java.lang.String error)
netStoppedError
in interface org.joone.engine.NeuralNetListener
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |