edu.isi.karma.modeling.semantictypes.mycrf.graph
Class GraphFieldOnly

java.lang.Object
  extended by edu.isi.karma.modeling.semantictypes.mycrf.graph.GraphFieldOnly
All Implemented Interfaces:
GraphInterface

public class GraphFieldOnly
extends java.lang.Object
implements GraphInterface

This class represents a single node graph. It also stores its computed partition function value, potential, and marginals.

Author:
amangoel

Field Summary
 Node node
           
 
Constructor Summary
GraphFieldOnly(java.lang.String file, boolean labeled, GlobalDataFieldOnly globalData)
           
GraphFieldOnly(java.lang.String fieldString, java.lang.String label, java.util.ArrayList<java.lang.String> features, GlobalDataFieldOnly globalData)
           
 
Method Summary
 void compute_graphPotential()
           
 void compute_Z()
           
 void computeGraphPotentialAndZ()
           
 void computeGraphPotentialAndZAndMarginals()
           
 void computeNodeMarginals()
           
 double logLikelihood()
           
 void logLikelihoodGradient(double[] gradient)
           
 double potentialExpForLabelIndex(int labelIndex)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

public Node node
Constructor Detail

GraphFieldOnly

public GraphFieldOnly(java.lang.String file,
                      boolean labeled,
                      GlobalDataFieldOnly globalData)

GraphFieldOnly

public GraphFieldOnly(java.lang.String fieldString,
                      java.lang.String label,
                      java.util.ArrayList<java.lang.String> features,
                      GlobalDataFieldOnly globalData)
Method Detail

compute_Z

public void compute_Z()

compute_graphPotential

public void compute_graphPotential()

computeNodeMarginals

public void computeNodeMarginals()

potentialExpForLabelIndex

public double potentialExpForLabelIndex(int labelIndex)

logLikelihood

public double logLikelihood()

logLikelihoodGradient

public void logLikelihoodGradient(double[] gradient)

computeGraphPotentialAndZ

public void computeGraphPotentialAndZ()
Specified by:
computeGraphPotentialAndZ in interface GraphInterface

computeGraphPotentialAndZAndMarginals

public void computeGraphPotentialAndZAndMarginals()
Specified by:
computeGraphPotentialAndZAndMarginals in interface GraphInterface