cc.mallet.grmm.types
Interface ParameterizedFactor

All Superinterfaces:
java.lang.Cloneable, Factor, java.io.Serializable
All Known Implementing Classes:
BinaryUnaryFactor, PottsTableFactor

public interface ParameterizedFactor
extends Factor

A factor that supports taking derivatives with respect to its continuous variables. For example, a Gaussian factor can support derivatives with respect to its mean and precision. $Id: ParameterizedFactor.java,v 1.1 2007/10/22 21:37:44 mccallum Exp $


Method Summary
 double sumGradLog(Factor q, Variable param, Assignment assn)
          Computes the expected derivative of the log factor value.
 
Methods inherited from interface cc.mallet.grmm.types.Factor
almostEquals, almostEquals, argmax, assignmentIterator, asTable, containsVar, divideBy, dumpToString, duplicate, entropy, exponentiate, extractMax, extractMax, extractMax, getVariable, isNaN, logValue, logValue, logValue, marginalize, marginalize, marginalize, marginalizeOut, marginalizeOut, multiply, multiplyBy, normalize, prettyOutputString, sample, slice, sum, value, value, varSet
 

Method Detail

sumGradLog

double sumGradLog(Factor q,
                  Variable param,
                  Assignment assn)
Computes the expected derivative of the log factor value. That is,
sum_{y} q(y) dlog f(y) / d theta
,
 where y are the outcomes of the discrete varables in the factor,
  f(y) is the factor value, and theta is the vector of continuous variables
  in the factor.  q is a user-specified distribution to take the expectation
  with respect to.
  

The factor q specifies with variables to sum over. The summation will be over all the variables in q.varSet(), and the rest of the variables will be used

Parameters:
q - Distribution to take with respect to (need not be normalized). q.varSet() should be all of the variables of this factor, except for one continuous variable
param - Parameter to take gradient with respect to.
Returns:
The expected gradient