RBNLearning
Class GradientGraphLikelihoodNode

java.lang.Object
  extended by RBNLearning.GradientGraphNode
      extended by RBNLearning.GradientGraphLikelihoodNode
All Implemented Interfaces:
java.lang.Comparable<GradientGraphNode>

public class GradientGraphLikelihoodNode
extends GradientGraphNode


Constructor Summary
GradientGraphLikelihoodNode(GradientGraph gg)
           
 
Method Summary
 void addToChildren(GradientGraphProbFormNode ggpfn, boolean tv)
           
 void addToChildren(GradientGraphProbFormNode ggpfn, GradientGraphIndicatorNode ggin)
           
 double evaluate()
          Computes the likelihood (ignoring those terms that are not dependent on unknown atoms or parameters) Returns the likelihood[0] component.
 void evaluateBounds()
           
 double evaluateGrad(int param)
          for compatibility with GradientGraphNode ....
 void evaluateGradients()
           
 double[] getSampleLikelihood(int sno)
           
 double[][] getSampleLikelihoods()
           
 double[][] getSmallgradient()
           
 double[] gradientAsDouble()
           
 double[] gradientAsDouble(int partial)
          Returns the gradient (scaled to fit double precision) with all components where zeros[i]=1 set to 0 Corresponds to taking partial derivatives, ignoring parameters with index i.
 double[] gradientsumAsDouble()
           
 double[] gradientsumAsDouble(int partial)
           
 void initSampleLikelihoods(int size)
           
 double[] likelihood()
           
 double[] likelihoodsum()
           
 double[] lowerBound()
           
 java.lang.String name()
          The name of this node.
 int numChildren()
           
 void resetBounds()
           
 void resetGradientSum()
           
 void resetLikelihoodSum()
           
 void resetValue()
           
 void setSampleLikelihood(int i)
          Sets the current likelihood value as the likelihood value for the i'th sample
 void updateGradSum()
           
 void updateLikelihoodSum()
          updates the likelihoodsum field by adding value
 double[] upperBound()
           
 
Methods inherited from class RBNLearning.GradientGraphNode
addToChildren, addToParents, ancestors, childrenSize, compareTo, equals, gradient, parents, reEvaluateUpstream, resetGradient, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientGraphLikelihoodNode

public GradientGraphLikelihoodNode(GradientGraph gg)
Method Detail

addToChildren

public void addToChildren(GradientGraphProbFormNode ggpfn,
                          boolean tv)

addToChildren

public void addToChildren(GradientGraphProbFormNode ggpfn,
                          GradientGraphIndicatorNode ggin)

evaluate

public double evaluate()
Computes the likelihood (ignoring those terms that are not dependent on unknown atoms or parameters) Returns the likelihood[0] component. THE RETURN VALUE IS MEANINGLESS! (it is there only for compatibility with other subclasses of GradientGraphNode, where evaluate returns a meaningful double value).

Specified by:
evaluate in class GradientGraphNode

evaluateGrad

public double evaluateGrad(int param)
for compatibility with GradientGraphNode ....

Specified by:
evaluateGrad in class GradientGraphNode

evaluateBounds

public void evaluateBounds()
Specified by:
evaluateBounds in class GradientGraphNode

evaluateGradients

public void evaluateGradients()

gradientsumAsDouble

public double[] gradientsumAsDouble()

gradientsumAsDouble

public double[] gradientsumAsDouble(int partial)

gradientAsDouble

public double[] gradientAsDouble()

gradientAsDouble

public double[] gradientAsDouble(int partial)
Returns the gradient (scaled to fit double precision) with all components where zeros[i]=1 set to 0 Corresponds to taking partial derivatives, ignoring parameters with index i.

Parameters:
zeros -
Returns:

initSampleLikelihoods

public void initSampleLikelihoods(int size)

likelihood

public double[] likelihood()

likelihoodsum

public double[] likelihoodsum()

lowerBound

public double[] lowerBound()

upperBound

public double[] upperBound()

name

public java.lang.String name()
The name of this node. The name identifies the function represented by a node.

Specified by:
name in class GradientGraphNode

numChildren

public int numChildren()

resetValue

public void resetValue()
Overrides:
resetValue in class GradientGraphNode

resetLikelihoodSum

public void resetLikelihoodSum()

resetGradientSum

public void resetGradientSum()

resetBounds

public void resetBounds()

setSampleLikelihood

public void setSampleLikelihood(int i)
Sets the current likelihood value as the likelihood value for the i'th sample


getSampleLikelihoods

public double[][] getSampleLikelihoods()

getSampleLikelihood

public double[] getSampleLikelihood(int sno)

updateLikelihoodSum

public void updateLikelihoodSum()
updates the likelihoodsum field by adding value


updateGradSum

public void updateGradSum()

getSmallgradient

public double[][] getSmallgradient()