RBNLearning
Class GradientGraph

java.lang.Object
  extended by RBNLearning.GradientGraph

public class GradientGraph
extends java.lang.Object


Constructor Summary
GradientGraph(RBN rbn, RelStruc A, Instantiation data)
           
 
Method Summary
protected  double computeCombFunc(int cf, double[] args)
           
 double[] currentGradient()
          Returns the current (expected) gradient as stored in the expectedPartDerivValue fields of the partial derivative nodes
 double currentLikelihood()
           
 double[] currentParameters()
           
 void evaluateAll(int sno)
           
 void evaluateLikelihood(int sno)
          evaluates the likelihood value for sample number sno.
 void evaluatePartDerivatives(int sno)
           
 double[] learnParameters()
           
 int numberOfParameters()
           
 java.lang.String parameterAt(int i)
           
 void resetSamplePartDerivs()
           
 void resetValues(boolean nongradonly)
           
 void sampleIndicators(int size)
           
 void showAllLikelihoods(double incr)
          Prints a list of likelihood values for all possible parameter settings obtained by varying each parameter from 0.0 to 1.0 using a stepsize of incr
 void showAllNodes(RelStruc A)
           
 void showGraphInfo()
           
 void showLikelihoodNode(RelStruc A)
           
 void updateAll()
           
 void updateLikelihood()
           
 void updatePartDerivatives()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientGraph

public GradientGraph(RBN rbn,
                     RelStruc A,
                     Instantiation data)
              throws RBNCompatibilityException
Throws:
RBNCompatibilityException
Method Detail

computeCombFunc

protected double computeCombFunc(int cf,
                                 double[] args)

currentLikelihood

public double currentLikelihood()

currentGradient

public double[] currentGradient()
Returns the current (expected) gradient as stored in the expectedPartDerivValue fields of the partial derivative nodes


currentParameters

public double[] currentParameters()

evaluateAll

public void evaluateAll(int sno)

numberOfParameters

public int numberOfParameters()

parameterAt

public java.lang.String parameterAt(int i)

updateAll

public void updateAll()

evaluateLikelihood

public void evaluateLikelihood(int sno)
evaluates the likelihood value for sample number sno. Increments the sample count and adds the value to the likelihoodsum


evaluatePartDerivatives

public void evaluatePartDerivatives(int sno)

updateLikelihood

public void updateLikelihood()

updatePartDerivatives

public void updatePartDerivatives()

resetValues

public void resetValues(boolean nongradonly)

resetSamplePartDerivs

public void resetSamplePartDerivs()

sampleIndicators

public void sampleIndicators(int size)

showLikelihoodNode

public void showLikelihoodNode(RelStruc A)

showAllNodes

public void showAllNodes(RelStruc A)

learnParameters

public double[] learnParameters()

showGraphInfo

public void showGraphInfo()

showAllLikelihoods

public void showAllLikelihoods(double incr)
Prints a list of likelihood values for all possible parameter settings obtained by varying each parameter from 0.0 to 1.0 using a stepsize of incr