RBNLearning
Class GradientGraph
java.lang.Object
RBNLearning.GradientGraph
public class GradientGraph
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GradientGraph
public GradientGraph(RBN rbn,
RelStruc A,
Instantiation data)
throws RBNCompatibilityException
- Throws:
RBNCompatibilityException
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