|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opttek.optquest.COptNeuralNet
The COptNeuralNet is used to create, train, and predict an OptQuest Neural Network. Nodes are defined using COptNeuralNetNode. Arcs are defined using COptNeuralNetArc. These nodes and arcs are added to the COptNeuralNet to create the OptQuest Neural Network. The network can then be trained using OptQuest Engine techniques. Once the network is trained, the network can be used to predict outputs from inputs. The structure can be saved and read back in.
| Field Summary | |
static int |
SECTION_ACTIVATION
|
static int |
SECTION_ARCNODENODEWEIGHT
|
static int |
SECTION_EPOWER
|
static int |
SECTION_NODELEVEL
|
static int |
SECTION_NUMLEVELS
|
static int |
SECTION_NUMNODESATLEVEL
|
static int |
SECTION_VERSION
|
| Constructor Summary | |
COptNeuralNet()
Default Constructor. |
|
COptNeuralNet(int license)
|
|
| Method Summary | |
void |
AddArc(COptNeuralNetArc arc)
AddArc() adds an arc to the OptQuest Neural Network. |
void |
AddBiasNode(COptNeuralNetNode node)
AddBiasNode() adds a Bias node to the OptQuest Neural Network. |
void |
AddHiddenNode(COptNeuralNetNode node)
AddHiddenNode() adds a Hidden node to the OptQuest Neural Network. |
void |
AddInputNode(COptNeuralNetNode node)
AddInputNode() adds an Input node to the OptQuest Neural Network. |
void |
AddOutputNode(COptNeuralNetNode node)
AddOutputNode() adds an Output node to the OptQuest Neural Network. |
void |
AddRandomWeights()
AddRandomWeights() sets the random values to all of the weights in the network. |
void |
CreateAndAddBiasNodes()
CreateAndAddBiasNodes() allows the user to add a bias node without creating the object separately. |
void |
CreateAndAddHiddenNodes(int numNodes,
int level)
CreateAndAddHiddenNodes() allows the user to add hidden nodes without creating the objects separately. |
void |
CreateAndAddInputNodes(int numNodes)
CreateAndAddInputNodes() allows the user to add input nodes without creating the objects separately. |
void |
CreateAndAddOutputNodes(int numNodes,
int level)
CreateAndAddOutputNodes() allows the user to add output nodes without creating the objects separately. |
void |
DeleteArc(COptNeuralNetArc arc)
DeleteArc() deletes an arc from the OptQuest Neural Network. |
void |
DeleteNode(COptNeuralNetNode node)
DeleteNode() deletes a node from the OptQuest Neural Network. |
void |
FullyConnectNetwork()
FullyConnectNetwork() allows the user to add fully connect the network without creating any arc objects. |
double |
GetBestObjectiveValue()
GetBestObjectiveValue() gets the best objective so far. |
double |
GetEPower()
GetEPower() returns the coefficient of the power for the sigmoid. |
int |
GetIteration()
GetIteration() gets the current iteration. |
int |
GetNumberOfHidden()
GetNumberOfHidden() returns the number of total hidden nodes in the network. |
int |
GetNumberOfInputs()
GetNumberOfInputs() returns the number of input nodes in the network. |
int |
GetNumberOfIterations()
GetNumberOfIterations() returns the number of iterations set. |
int |
GetNumberOfOutputs()
GetNumberOfOutputs() returns the number of output nodes in the network. |
int |
GetRepeat()
GetRepeat() gets the current repeat. |
void |
MonitorStatus()
Monitor Status is used to monitor the progress of the training. |
void |
Predict(double[] input,
double[] predict)
Predict() predicts the outputs from the supplied inputs. |
void |
Predict(int numObs,
double[][] input,
double[][] predict)
Predict() predicts the outputs from the supplied inputs. |
void |
ReadNetworkDefinition(java.lang.String filename)
ReadNetworkDefinition() reads the network definition from a file and creates the network from the information provided in the file. |
void |
SetDefaultActivation(int useActivationFunction)
SetDefaultActivation() sets the default activation function for the OptQuest Neural Network. |
void |
SetEPower(double power)
SetEPower() sets the coefficient of the power for the sigmoid. |
void |
SetInputScale()
SetInputScale() sets the scaling of the input to a [0,1] value based on the minimum/maximum values in the training set. |
void |
SetLicense(int license)
|
void |
SetLowerBound(double lowerBound)
SetLowerBound() sets the lower bound of the weights. |
void |
SetMeanErrorPower(double val)
SetMeanErrorPower() sets the power to which the absolute difference is raised when calculating the objective for the training. |
void |
SetOptimizePower(double lowerbound,
double upperbound)
SetOptimizePower() indicates to optimize the power coefficient during training. |
void |
SetOutputScale()
SetOutputScale() sets the scaling of the output to a [0,1] value based on the minimum/maximum values in the training set. |
void |
SetRegressionForLastLevel(boolean bUseRgr)
SetRegressionForLastLevel() sets whether or not to use linear regression for the arc weights coming into the output nodes. |
void |
SetRepeat(int repeat)
SetRepeat() repeats the training for the given number of times (default = 1). |
void |
SetStoppingRuleError(double val)
SetStoppingRuleError() sets the error for which the training stops before the number of iterations is complete(). |
void |
SetStoppingRuleIterations(int iterations)
SetStoppingRuleIterations() sets the number of iterations to run during training. |
void |
SetTrainingSetMemory(int numObs,
double[][] inputMatrix,
double[][] expectedMatrix,
double[][] predictedMatrix)
SetInputTypeMemory() sets the training set input. |
void |
SetTrainingTypeAll()
SetTrainingTypeAll() trains all non-fixed weights. |
void |
SetTrainingTypeLevel()
SetTrainingTypeLevel() trains each all non-fixed weights at each level, starting at the outputs. |
void |
SetTrainingTypeNode()
SetTrainingTypeNode() trains each all non-fixed weights coming in to each node, node by node. |
void |
SetTrainingTypeNodeRandom()
SetTrainingTypeNodeRandom() trains each all non-fixed weights coming in to each node, node by node in a random order. |
void |
SetTrainingTypeRandom(int numWeights)
SetTrainingTypeRandom() randomly selects "numWeights" number of non-fixed weights to train. |
void |
SetUpperBound(double upperBound)
SetUpperBound() sets the upper bound of the weights. |
void |
Stop()
Stop() stops the training. |
void |
Train()
Train() trains the network based on the training parameters set. |
void |
WriteNetworkDefinition(java.lang.String filename)
WriteNetworkDefinition() writes the network definition into a file. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SECTION_VERSION
public static final int SECTION_NUMLEVELS
public static final int SECTION_NUMNODESATLEVEL
public static final int SECTION_NODELEVEL
public static final int SECTION_ARCNODENODEWEIGHT
public static final int SECTION_ACTIVATION
public static final int SECTION_EPOWER
| Constructor Detail |
public COptNeuralNet()
public COptNeuralNet(int license)
| Method Detail |
public void SetLicense(int license)
public void CreateAndAddInputNodes(int numNodes)
throws COptNeuralNetException
numNodes - - the number of input nodes.
COptNeuralNetException
public void CreateAndAddBiasNodes()
throws COptNeuralNetException
COptNeuralNetException
public void CreateAndAddHiddenNodes(int numNodes,
int level)
throws COptNeuralNetException
numNodes - - the number of hidden nodes.level - - the level of hidden nodes.
COptNeuralNetException
public void CreateAndAddOutputNodes(int numNodes,
int level)
throws COptNeuralNetException
numNodes - - the number of hidden nodes.level - - the level of hidden nodes.
COptNeuralNetExceptionpublic void FullyConnectNetwork()
public void AddInputNode(COptNeuralNetNode node)
throws COptNeuralNetException
node - - the node to add to the network.
COptNeuralNetException
public void AddHiddenNode(COptNeuralNetNode node)
throws COptNeuralNetException
node - - the node to add to the network.
COptNeuralNetException
public void AddOutputNode(COptNeuralNetNode node)
throws COptNeuralNetException
node - - the node to add to the network.
COptNeuralNetException
public void AddBiasNode(COptNeuralNetNode node)
throws COptNeuralNetException
node - - the node to add to the network.
COptNeuralNetExceptionpublic void DeleteNode(COptNeuralNetNode node)
node - - the node to remove from the network.public int GetNumberOfInputs()
public int GetNumberOfOutputs()
public int GetNumberOfHidden()
public void AddArc(COptNeuralNetArc arc)
throws COptNeuralNetException
arc - - the arc to add to the network.
COptNeuralNetExceptionpublic void DeleteArc(COptNeuralNetArc arc)
arc - - the arc to delete from the network.
public void Predict(int numObs,
double[][] input,
double[][] predict)
throws COptNeuralNetException
numObs - - number of observations in the input matrixinput - - input matrix of input values.
The first index is the observation (0 to numObs-1).
The second index is the input node (1 to Number of Input Nodes).
The order is the same as they were added to the network.predict - - output matrix of predicted values.
The first index is the observation (0 to numObs-1).
The second index is the output node (1 to Number of Output Nodes).
The order is the same as they were added to the network.
COptNeuralNetException
public void Predict(double[] input,
double[] predict)
throws COptNeuralNetException
input - - input array of input values.
The index is the input node (1 to Number of Input Nodes).
The order is the same as they were added to the network.predict - - output matrix of predicted values.
The index is the output node (1 to Number of Output Nodes).
The order is the same as they were added to the network.
COptNeuralNetExceptionpublic void SetDefaultActivation(int useActivationFunction)
useActivationFunction - public void SetEPower(double power)
power - - new power coefficientpublic double GetEPower()
public void SetOptimizePower(double lowerbound,
double upperbound)
lowerbound - - lower bound of the power coefficient.upperbound - - upper bound of the power coefficient.
public void ReadNetworkDefinition(java.lang.String filename)
throws COptNeuralNetException
filename - - filename containing the network definition.
COptNeuralNetException
public void WriteNetworkDefinition(java.lang.String filename)
throws COptNeuralNetException
filename - - filename containing the network definition.
COptNeuralNetExceptionpublic void Stop()
public void AddRandomWeights()
throws COptQuestException
COptQuestException
public void Train()
throws COptNeuralNetException,
COptQuestException
COptNeuralNetException
COptQuestExceptionpublic void SetTrainingTypeRandom(int numWeights)
numWeights - public void SetTrainingTypeAll()
public void SetTrainingTypeNode()
public void SetTrainingTypeNodeRandom()
public void SetTrainingTypeLevel()
public void SetStoppingRuleIterations(int iterations)
iterations - - number of iterations to runpublic void SetRepeat(int repeat)
repeat - public int GetNumberOfIterations()
public void SetTrainingSetMemory(int numObs,
double[][] inputMatrix,
double[][] expectedMatrix,
double[][] predictedMatrix)
numObs - - number of Observations in the input/outputsinputMatrix - - matrix containing input values. First index
is the observation (0 to numObs-1). Second index is the input
values (1 to number of input nodes).expectedMatrix - - matrix containing expected values. First index
is the observation (0 to numObs-1). Second index is the output
values (1 to number of output nodes).predictedMatrix - - temporary matrix to place predicted values. First index
is the observation (0 to numObs-1). Second index is the output
values (1 to number of output nodes).public void SetInputScale()
public void SetOutputScale()
public void SetRegressionForLastLevel(boolean bUseRgr)
bUseRgr - -true/falsepublic void MonitorStatus()
public int GetRepeat()
public int GetIteration()
public double GetBestObjectiveValue()
public void SetUpperBound(double upperBound)
upperBound - - upper bound of the weights.public void SetLowerBound(double lowerBound)
lowerBound - - lower bound of the weights.public void SetMeanErrorPower(double val)
val - - powerpublic void SetStoppingRuleError(double val)
val - - error to stop upon reaching
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||