com.opttek.optquest
Class COptNeuralNetNode

java.lang.Object
  extended bycom.opttek.optquest.COptNeuralNetNode

public class COptNeuralNetNode
extends java.lang.Object

The COptNeuralNetNode is used to create nodes for an OptQuest Neural Network. These nodes are added to the COptNeuralNet to create the OptQuest Neural Network. Nodes are defined by a unique node number, a type (input,bias,sum,product), and a level.


Field Summary
static int BADACTIVATION
           
static int BADNODE
           
static int BIASNODE
           
static int DEFAULTACTIVATION
           
static int IDENTITYACTIVATION
           
static int INPUTNODE
           
static int PRODUCTNODE
           
static int SIGMOID01ACTIVATION
           
static int SIGMOIDNEG11ACTIVATION
           
static java.lang.String STRING_ACTIVATION01
           
static java.lang.String STRING_ACTIVATIONDEFAULT
           
static java.lang.String STRING_ACTIVATIONIDENTITY
           
static java.lang.String STRING_ACTIVATIONMINUS11
           
static java.lang.String STRING_TYPEBIAS
           
static java.lang.String STRING_TYPEINPUT
           
static java.lang.String STRING_TYPEPRODUCT
           
static java.lang.String STRING_TYPESUM
           
static int SUMNODE
           
 
Constructor Summary
COptNeuralNetNode()
          Default Constructor.
COptNeuralNetNode(int type, int num, int level)
          Constructor that accepts the type, node number and level as input.
 
Method Summary
 int GetActivationFunction()
          Get the activation function of the node.
 int GetLevel()
          Get the level of the node.
 double GetMaximumScale()
          Get the maximum value of the scaling.
 double GetMinimumScale()
          Get the minimum value of the scaling.
 int GetNodeNumber()
          Get the node number of the node.
 int GetType()
          Get the type of the node.
 boolean IsScaled()
          Check if the input/output node is scaled.
 void SetActivationFunction(int act)
          Set the activation function of the node.
 void SetLevel(int level)
          Set the level of the node.
 void SetNodeNumber(int number)
          Set the node number of the node.
 void SetScale(double min, double max)
          Set the scaling of the node.
 void SetType(int type)
          Set the type of the node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUTNODE

public static final int INPUTNODE
See Also:
Constant Field Values

BIASNODE

public static final int BIASNODE
See Also:
Constant Field Values

SUMNODE

public static final int SUMNODE
See Also:
Constant Field Values

PRODUCTNODE

public static final int PRODUCTNODE
See Also:
Constant Field Values

BADNODE

public static final int BADNODE
See Also:
Constant Field Values

STRING_TYPEINPUT

public static final java.lang.String STRING_TYPEINPUT
See Also:
Constant Field Values

STRING_TYPEBIAS

public static final java.lang.String STRING_TYPEBIAS
See Also:
Constant Field Values

STRING_TYPESUM

public static final java.lang.String STRING_TYPESUM
See Also:
Constant Field Values

STRING_TYPEPRODUCT

public static final java.lang.String STRING_TYPEPRODUCT
See Also:
Constant Field Values

DEFAULTACTIVATION

public static final int DEFAULTACTIVATION
See Also:
Constant Field Values

SIGMOID01ACTIVATION

public static final int SIGMOID01ACTIVATION
See Also:
Constant Field Values

SIGMOIDNEG11ACTIVATION

public static final int SIGMOIDNEG11ACTIVATION
See Also:
Constant Field Values

IDENTITYACTIVATION

public static final int IDENTITYACTIVATION
See Also:
Constant Field Values

BADACTIVATION

public static final int BADACTIVATION
See Also:
Constant Field Values

STRING_ACTIVATION01

public static final java.lang.String STRING_ACTIVATION01
See Also:
Constant Field Values

STRING_ACTIVATIONMINUS11

public static final java.lang.String STRING_ACTIVATIONMINUS11
See Also:
Constant Field Values

STRING_ACTIVATIONIDENTITY

public static final java.lang.String STRING_ACTIVATIONIDENTITY
See Also:
Constant Field Values

STRING_ACTIVATIONDEFAULT

public static final java.lang.String STRING_ACTIVATIONDEFAULT
See Also:
Constant Field Values
Constructor Detail

COptNeuralNetNode

public COptNeuralNetNode()
Default Constructor. The type, number, and level must be set before this is a valid node.


COptNeuralNetNode

public COptNeuralNetNode(int type,
                         int num,
                         int level)
Constructor that accepts the type, node number and level as input. Each node number must be unique within the network. The level is used to determine how the network is traversed

Parameters:
type - - the type of the node.
num - - the number of the node.
level - - the level of the node.
Method Detail

SetNodeNumber

public void SetNodeNumber(int number)
Set the node number of the node. Each node number must be unique within the network.

Parameters:
number - - the number of the node.

GetNodeNumber

public int GetNodeNumber()
Get the node number of the node.

Returns:
node number of the node

SetLevel

public void SetLevel(int level)
Set the level of the node. The level is used to determine how the network is traversed; the network is traversed from level 1 to the last level in the network one level at a time.

Parameters:
level - - the level of the node.

GetLevel

public int GetLevel()
Get the level of the node.

Returns:
level of the node

SetType

public void SetType(int type)
Set the type of the node.

Parameters:
type - - the type of the node.
  • COptNeuralNetNode.INPUTNODE. The node is an input node whose value is provided by the input matrix.
  • COptNeuralNetNode.BIASNODE. The node is a bias node whose value is 1.0.
  • COptNeuralNetNode.SUMNODE. The node is a node whose value is the sum of the incoming arcs.
  • COptNeuralNetNode.PRODUCTNODE. The node is a node whose value is the product of the incoming arcs.

GetType

public int GetType()
Get the type of the node.

Returns:
Type of the node

SetActivationFunction

public void SetActivationFunction(int act)
Set the activation function of the node.

Parameters:
act - - the activation function.
  • COptNeuralNetNode.DEFAULTACTIVATION. The node uses the default activation function for the entire network. This is the value that is usually used.
  • COptNeuralNetNode.SIGMOID01ACTIVATION. The node uses the [0,1] sigmoid function as the activation function.
  • COptNeuralNetNode.SIGMOIDNEG11ACTIVATION. The node uses the [-1,1] sigmoid function as the activation function.
  • COptNeuralNetNode.IDENTITYACTIVATION. The node uses the identity function as the activation function. No function is applied to the value.

GetActivationFunction

public int GetActivationFunction()
Get the activation function of the node.

Returns:
activation function of the node

SetScale

public void SetScale(double min,
                     double max)
Set the scaling of the node. The scaling is used to scale input or output nodes to make them either a [0,1] or a [-1,1] value.

Parameters:
min - - the minimum value for the input/output.
max - - the maximum value for the input/output.

IsScaled

public boolean IsScaled()
Check if the input/output node is scaled.

Returns:
true if scaled, false if not

GetMinimumScale

public double GetMinimumScale()
Get the minimum value of the scaling.

Returns:
minimum value of the scaling

GetMaximumScale

public double GetMaximumScale()
Get the maximum value of the scaling.

Returns:
maximum value of the scaling