gpalta.nodes
Class DistanceToCentroid
java.lang.Object
gpalta.nodes.Node
gpalta.nodes.RBF
- All Implemented Interfaces:
- NodeParent, java.io.Serializable, java.lang.Cloneable
public class DistanceToCentroid
- extends Node
- See Also:
- Serialized Form
Method Summary |
double |
eval(ProblemData problemData)
Evaluate the Node for a single sample. |
void |
evalVectInternal(double[] outVect,
double[][] kidsOutput,
ProblemData problemData)
Internal method that evaluates the Node given its kids' outputs. |
void |
init(Config config,
ProblemData problemData)
Initialize the Node. |
java.lang.String |
name()
Get the Node's short name (such as "plus", "minus", "x1", etc) |
int |
nKids()
Read the number of kids of the Node |
Methods inherited from class gpalta.nodes.Node |
clone, deepClone, evalVect, getCurrentDepth, getKid, getMaxDepthFromHere, getNSubNodes, getParent, getWhichKidOfParent, newKids, parse, setCurrentDepth, setKid, setMaxDepthFromHere, setNSubNodes, setParent, setTypeOfKids, setWhichKidOfParent, toString, typeOfKids |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
c
public double[] c
DistanceToCentroid
public DistanceToCentroid()
init
public void init(Config config,
ProblemData problemData)
- Description copied from class:
Node
- Initialize the Node. Override this if the node has a state that needs to be specified when
created
- Overrides:
init
in class Node
eval
public double eval(ProblemData problemData)
- Description copied from class:
Node
- Evaluate the Node for a single sample. All Nodes must override this method. The Node is
responsible for evaluating its children, if any.
- Specified by:
eval
in class Node
- Returns:
- The output of the Node
evalVectInternal
public void evalVectInternal(double[] outVect,
double[][] kidsOutput,
ProblemData problemData)
- Description copied from class:
Node
- Internal method that evaluates the Node given its kids' outputs. All Nodes must override this
method. Different to eval(), in this case, kids are already evaluated
- Specified by:
evalVectInternal
in class Node
- Parameters:
outVect
- The array where the outout must be storedkidsOutput
- Each array holds all the outputs for a kidproblemData
- The problem's data
nKids
public int nKids()
- Description copied from class:
Node
- Read the number of kids of the Node
- Specified by:
nKids
in interface NodeParent
- Specified by:
nKids
in class Node
- Returns:
- The number of kids this Node has
name
public java.lang.String name()
- Description copied from class:
Node
- Get the Node's short name (such as "plus", "minus", "x1", etc)
- Specified by:
name
in class Node
- Returns:
- The Node's name