cc.factorie.infer

GibbsSampler

class GibbsSampler extends ProposalSampler[Var]

Sample a value for a single variable. This sampler works in one of two ways: If the model is a DirectedModel, then sampling is performed based on a suite a handlers selected according to the variable type and its neighboring factors. If the model is not a DirectedModel, then the variable should inherit from IterableSettings which is used to create a list of Proposals with alternative values.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GibbsSampler
  2. ProposalSampler
  3. Sampler
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GibbsSampler(model: model.Model, objective: model.Model = null)(implicit random: Random)

Type Members

  1. type ContextType = Var

    Definition Classes
    Sampler
  2. type V = variable.Var

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val cacheClosures: Boolean

  8. var changeCount: Int

    The number of calls to process that resulted in a change (a non-empty DiffList)

    The number of calls to process that resulted in a change (a non-empty DiffList)

    Definition Classes
    Sampler
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def closures: HashMap[V, GibbsSamplerClosure]

  11. def defaultHandlers: GibbsSamplerDefaultHandlers.type

  12. val doProcessByHandlers: Boolean

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def handlers: Iterable[GibbsSamplerHandler]

  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. var iterationCount: Int

    The number of calls to process(numIterations:Int) or process(contexts:C,numIterations:Int).

    The number of calls to process(numIterations:Int) or process(contexts:C,numIterations:Int).

    Definition Classes
    Sampler
  21. var makeNewDiffList: Boolean

    If true, calls to "newDiffList" will create a new DiffList to describe the changes they made, otherwise "newDiffList" will return null.

    If true, calls to "newDiffList" will create a new DiffList to describe the changes they made, otherwise "newDiffList" will return null.

    Definition Classes
    Sampler
  22. val model: model.Model

    Definition Classes
    GibbsSamplerProposalSampler
  23. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def newDiffList: variable.DiffList

    In your implementation of "process1" use this method to optionally create a new DiffList, obeying "makeNewDiffList".

    In your implementation of "process1" use this method to optionally create a new DiffList, obeying "makeNewDiffList".

    Definition Classes
    Sampler
  25. def noDiffList: GibbsSampler.this.type

    Convenient method for setting makeNewDiffList to false, and returning this.

    Convenient method for setting makeNewDiffList to false, and returning this.

    Definition Classes
    Sampler
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. val objective: model.Model

  29. def pickProposal(proposals: Seq[Proposal[Var]]): Proposal[Var]

    Definition Classes
    ProposalSampler
  30. def postIterationHook: Boolean

    Called after each iteration of sampling the full list of variables.

    Called after each iteration of sampling the full list of variables. Return false if you want sampling to stop early.

    Definition Classes
    Sampler
  31. val postIterationHooks: Hooks0

    Definition Classes
    Sampler
  32. def postProcessHook(context: Var, difflist: DiffList): Unit

    Call just after each step of sampling.

    Call just after each step of sampling.

    Definition Classes
    Sampler
  33. def preProcessHook(context: Var): Var

    Called just before each step of sampling.

    Called just before each step of sampling. Return an alternative variable if you want that one sampled instead. Return null if you want to abort sampling of this context.

    Definition Classes
    Sampler
  34. final def process(count: Int): Unit

    Definition Classes
    Sampler
  35. final def process(context: Var, repeat: Int): Unit

    Definition Classes
    Sampler
  36. final def process(context: Var): DiffList

    Do one step of sampling.

    Do one step of sampling. This is a method intended to be called by users. It manages hooks and processCount.

    Definition Classes
    Sampler
  37. def process1(v: V): DiffList

    The underlying protected method that actually does the work.

    The underlying protected method that actually does the work. Use this.newDiffList to optionally create returned DiffList. Needs to be defined in subclasses.

    Definition Classes
    GibbsSamplerProposalSamplerSampler
  38. final def processAll(contexts: Iterable[Var], numIterations: Int): Unit

    Definition Classes
    Sampler
  39. final def processAll(contexts: Iterable[Var], returnDiffs: Boolean = false): DiffList

    Definition Classes
    Sampler
  40. def processByHandlers(v: V): DiffList

  41. var processCount: Int

    The number of calls to process(context:C)

    The number of calls to process(context:C)

    Definition Classes
    Sampler
  42. def processProposals(props: Seq[Proposal[Var]]): DiffList

    Definition Classes
    ProposalSampler
  43. def proposalHook(proposal: Proposal[Var]): Unit

    Definition Classes
    ProposalSampler
  44. val proposalHooks: Hooks1[Proposal[Var]]

    Definition Classes
    ProposalSampler
  45. def proposals(dv: DiscreteVariable): Seq[Proposal[V]]

  46. def proposals(si: SettingIterator, v: V): Seq[Proposal[V]]

  47. def proposals(v: V): Seq[Proposal[V]]

    Definition Classes
    GibbsSamplerProposalSampler
  48. def proposalsHook(proposals: Seq[Proposal[Var]]): Unit

    Definition Classes
    ProposalSampler
  49. val proposalsHooks: Hooks1[Seq[Proposal[Var]]]

    Definition Classes
    ProposalSampler
  50. implicit val random: Random

    Definition Classes
    GibbsSamplerSampler
  51. def setHandlers(h: Iterable[GibbsSamplerHandler]): Unit

  52. def skipEmptyProposals: Boolean

    Definition Classes
    ProposalSampler
  53. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  54. var temperature: Double

    Definition Classes
    ProposalSampler
  55. def toString(): String

    Definition Classes
    AnyRef → Any
  56. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ProposalSampler[Var]

Inherited from Sampler[Var]

Inherited from AnyRef

Inherited from Any

Ungrouped