org.knowceans.dirichlet.sandbox
Class LdaMarkovStateHyper

java.lang.Object
  extended by org.knowceans.dirichlet.lda.LdaMarkovState
      extended by org.knowceans.dirichlet.sandbox.LdaMarkovStateHyper
All Implemented Interfaces:
java.io.Serializable

public class LdaMarkovStateHyper
extends LdaMarkovState

LdaMarkovStateHyperCps is a markov state that supports training of hyperparameters, both for vectorial and symmetric priors.

Author:
gregor
See Also:
Serialized Form

Field Summary
 double alpha
          symmetric hyperparameter alpha or sum of valpha trained from observations, not used for a priori alpha.
 double beta
          symmetric hyperparameter beta or sum of vbeta trained from observations; not used for a priori beta.
 double[] valpha
          K hyperparameters alpha trained from observations, not used for a priori alpha.
 double[] vbeta
          V hyperparameters beta trained from observations; not used for a priori beta.
 
Fields inherited from class org.knowceans.dirichlet.lda.LdaMarkovState
nd, ndsum, nw, nwsum, V, w, z
 
Constructor Summary
LdaMarkovStateHyper()
           
LdaMarkovStateHyper(java.lang.String ldaBase)
           
 
Method Summary
 void init(int K, java.util.Random rand)
          Random allocation and initialisaton of the state count vectors.
protected  void initAb()
          Allocate the hyperparameters to zero (sampler must assign values).
 void load(java.lang.String filename)
          Load state arrays from file.
 void save(java.lang.String filename)
          Save (optionally compressed) file.
 
Methods inherited from class org.knowceans.dirichlet.lda.LdaMarkovState
copyTo, initNd, initNw, recalculate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valpha

public double[] valpha
K hyperparameters alpha trained from observations, not used for a priori alpha.


vbeta

public double[] vbeta
V hyperparameters beta trained from observations; not used for a priori beta.


alpha

public double alpha
symmetric hyperparameter alpha or sum of valpha trained from observations, not used for a priori alpha.


beta

public double beta
symmetric hyperparameter beta or sum of vbeta trained from observations; not used for a priori beta.

Constructor Detail

LdaMarkovStateHyper

public LdaMarkovStateHyper()

LdaMarkovStateHyper

public LdaMarkovStateHyper(java.lang.String ldaBase)
Parameters:
ldaBase -
Method Detail

init

public void init(int K,
                 java.util.Random rand)
Description copied from class: LdaMarkovState
Random allocation and initialisaton of the state count vectors.

Overrides:
init in class LdaMarkovState

initAb

protected void initAb()
Allocate the hyperparameters to zero (sampler must assign values).


load

public void load(java.lang.String filename)
Description copied from class: LdaMarkovState
Load state arrays from file.

Overrides:
load in class LdaMarkovState

save

public void save(java.lang.String filename)
Description copied from class: LdaMarkovState
Save (optionally compressed) file.

Overrides:
save in class LdaMarkovState