Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.grmm.learning
Class ACRF.UnrolledGraph

    java.lang.Object
      cc.mallet.grmm.types.FactorGraph
          cc.mallet.grmm.types.UndirectedModel
              cc.mallet.grmm.learning.ACRF.UnrolledGraph

All Implemented Interfaces:
  Factor, java.io.Serializable, java.lang.Cloneable

Enclosing class:
  ACRF

    public static class ACRF.UnrolledGraph

extends UndirectedModel

See Also:
  Serialized Form

Constructor Summary
`ACRF.UnrolledGraph(Instance inst, ACRF.Template[] templates, ACRF.Template[] fixed)`
`ACRF.UnrolledGraph(Instance inst, ACRF.Template[] templates, java.util.List fixed, boolean setupPotentials)` Creates a graphical model for a given instance.

Method Summary
`void` | `addClique(ACRF.UnrolledVarSet clique)`
`double[]` | `computeCurrentResids()`
`Variable` | `get(int idx)` Returns a variable from this model with a given index.
`Assignment` | `getAssignment()` Returns an Assignment object that corresponds to the LabelSequence for which this graph was unrolled.
`int` | `getIndex(Variable var)` Returns a unique numeric index for a variable in this model.
`int` | `getIndex(VarSet vs)`
`double[]` | `getLastResids()`
`double` | `getLogNumAssignments()`
`ACRF.UnrolledVarSet` | `getUnrolledVarSet(Factor f)`
`ACRF.UnrolledVarSet` | `getUnrolledVarSet(int cnum)`
`int` | `numSlices()`
`int` | `observedValue(Variable var)`
`void` | `setObserved(Variable var, int outcome)`
`java.util.Iterator` | `unrolledVarSetIterator()`
`Variable` | `varOfIndex(int t, int j)`

Methods inherited from class cc.mallet.grmm.types.UndirectedModel
`addFactor, createBoltzmannMachine, getEdgeSet, isConnected`

Methods inherited from class cc.mallet.grmm.types.FactorGraph
`addFactor, afterFactorAdd, allFactorsContaining, allFactorsContaining, allFactorsOf, allFactorsOf, almostEquals, almostEquals, argmax, assignmentIterator, asTable, beforeFactorAdd, clear, containsVar, divideBy, dump, dump, dumpToString, duplicate, entropy, exponentiate, extractMax, extractMax, extractMax, factorOf, factorOf, factorOf, factorOf, factorProduct, factors, factorsIterator, findVariable, getAdjacentVertices, getDegree, getFactor, getIndex, getInferenceCache, getVariable, isAdjacent, isNaN, logify, logValue, logValue, logValue, marginalize, marginalize, marginalize, marginalizeOut, marginalizeOut, multiply, multiplyBy, normalize, numVariables, printAsDot, printAsDot, remove, remove, sample, sampleContinuousVars, setInferenceCache, slice, slice, sum, toString, value, value, variablesIterator, variablesSet, varSet, varSetIterator`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ACRF.UnrolledGraph

    public ACRF.UnrolledGraph(Instance inst,
                              ACRF.Template[] templates,
                              ACRF.Template[] fixed)

### ACRF.UnrolledGraph

    public ACRF.UnrolledGraph(Instance inst,
                              ACRF.Template[] templates,
                              java.util.List fixed,
                              boolean setupPotentials)

  Creates a graphical model for a given instance. This is called unrolling a dynamic model.

Method Detail

### addClique

    public void addClique(ACRF.UnrolledVarSet clique)

### getLastResids

    public double[] getLastResids()

### getAssignment

    public Assignment getAssignment()

  Returns an Assignment object that corresponds to the LabelSequence for which this graph was unrolled.

### setObserved

    public void setObserved(Variable var,
                            int outcome)

### observedValue

    public int observedValue(Variable var)

### unrolledVarSetIterator

    public java.util.Iterator unrolledVarSetIterator()

### getUnrolledVarSet

    public ACRF.UnrolledVarSet getUnrolledVarSet(int cnum)

### getIndex

    public int getIndex(VarSet vs)

### get

    public Variable get(int idx)

  Description copied from class: `FactorGraph`
  Returns a variable from this model with a given index. Every UndirectedModel `mdl` maintains a mapping between its variables and the integers 0...size(mdl)-1 , which is suitable for caching the variables in an array.

  `getIndex` and `get` are inverses. That is, if `idx == getIndex (var)`, then `get(idx)` will return `var`.

  Overrides:
    `get` in class `FactorGraph`
  See Also:
    `FactorGraph.getIndex(Variable)`

### getIndex

    public int getIndex(Variable var)

  Description copied from class: `FactorGraph`
  Returns a unique numeric index for a variable in this model. Every UndirectedModel `mdl` maintains a mapping between its variables and the integers 0...size(mdl)-1 , which is suitable for caching the variables in an array.

  `getIndex` and `get` are inverses. That is, if `idx == getIndex (var)`, then `get(idx)` will return `var`.

  Overrides:
    `getIndex` in class `FactorGraph`
  Parameters:
    `var` - A variable contained in this graphical model
  Returns:
    The numeric index of var
  See Also:
    `FactorGraph.get(int)`

### getLogNumAssignments

    public double getLogNumAssignments()

### varOfIndex

    public Variable varOfIndex(int t,
                               int j)

### numSlices

    public int numSlices()

### computeCurrentResids

    public double[] computeCurrentResids()

### getUnrolledVarSet

    public ACRF.UnrolledVarSet getUnrolledVarSet(Factor f)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD