|
| | Model_FastSample (Vocab *pv) |
| |
| | Model_FastSample (Vocab *pv, int maxlen) |
| |
| LogP | ProposeW0 (VocabID &wi, Seq &seq, int nPos, bool bSample=true) |
| |
| void | ProposeCProbs (VecShell< LogP > &logps, Seq &seq, int nPos) |
| |
| void | MarkovMove (Seq &seq) |
| | [sample] Markov Move - perform the gibbs sampling More...
|
| |
| void | SamplePos (Seq &seq, int nPos) |
| |
| | Model (Vocab *pv) |
| | constructor More...
|
| |
| | Model (Vocab *pv, int maxlen) |
| | constructor More...
|
| |
| | ~Model () |
| | destructor More...
|
| |
| int | GetMaxLen () const |
| | Get max-len. More...
|
| |
| Vocab * | GetVocab () const |
| | Get Vocab. More...
|
| |
| int | GetMaxOrder () const |
| | Get maximum order. More...
|
| |
| int | GetParamNum () const |
| | Get parameter number. More...
|
| |
| void | Reset (Vocab *pv, int maxlen) |
| | reset, the maxlen is the length excluding the beg/end symbols. More...
|
| |
| virtual void | SetParam (PValue *pValue) |
| | Set the parameters. More...
|
| |
| void | GetParam (PValue *pValue) |
| | Get the paremetre vector. More...
|
| |
| void | SetPi (Prob *pPi) |
| | Set the pi. More...
|
| |
| template<typename T > |
| void | SetZeta (T *pzeta) |
| | Set updated zeta. More...
|
| |
| template<typename T > |
| void | GetZeta (T *pzeta) |
| |
| LogP | GetLogProb (Seq &seq, bool bNorm=true) |
| | calculate the probability More...
|
| |
| void | LoadFromCorpus (const char *pcorpus, const char *pfeatstyle, int nOrder) |
| | load ngram features from corpus More...
|
| |
| void | FeatCount (Seq &seq, double *pCount, double dadd=1.0) |
| | Count the feature number in a sequence. More...
|
| |
| void | ReadT (const char *pfilename) |
| | Read Model. More...
|
| |
| void | WriteT (const char *pfilename) |
| | Write Model. More...
|
| |
| LogP | ClusterSum (Seq &seq, int nPos, int nOrder) |
| | Read Binary. More...
|
| |
| virtual double | ExactNormalize (int nLen) |
| | [exact] Exact Normalization, return the logz of given length More...
|
| |
| virtual void | ExactNormalize () |
| | [exact] Exact Normalization More...
|
| |
| void | GetNodeExp (int nLen, double *pExp) |
| | [exact] E_{p_l}[f]: Exactly calculate the expectation over x and h for length nLen More...
|
| |
| void | GetNodeExp (double *pExp, Prob *pLenProb=NULL) |
| | [exact] sum_l { n_l/n * E_{p_l}[f] }: Exactly calculate the expectation over x and h More...
|
| |
| void | Sample (Seq &seq) |
| | [sample] Perform one train-dimensional mixture sampling More...
|
| |
| void | LocalJump (Seq &seq) |
| | [sample] Local Jump - sample a new length More...
|
| |
| LogP | ProposeLength (int nOld, int &nNew, bool bSample) |
| | [sample] Propose the length, using the variable m_matLenJump More...
|
| |
| LogP | ProposeC0 (VocabID &ci, Seq &seq, int nPos, bool bSample) |
| | [sample] Propose the c_{i} at position i. Then return the propose probability R(c_i|h_i,c_{other}) More...
|
| |
| void | ProposeCProbs (VecShell< LogP > &logps, Seq &seq, int nPos) |
| | [sample] Return the propose distribution of c_i at position nPos More...
|
| |
| LogP | GetReducedModelForC (Seq &seq, int nPos) |
| | [sample] A unnormalized reduced model to sample class c_i. More...
|
| |
| LogP | GetReducedModelForW (Seq &seq, int nPos) |
| | [sample] A unnormalized reduced model to sample word w_i. More...
|
| |
| LogP | GetReducedModel (Seq &seq, int nPos) |
| | [sample] A unnormalized reduced depending on nPos. More...
|
| |
| LogP | GetMarginalProbOfC (Seq &seq, int nPos) |
| | [sample] given c_i, summate the probabilities of x_i, i.e. P(c_i) More...
|
| |
| void | SampleC (Seq &seq, int nPos) |
| | [sample] Sample the c_i at position nPos without x_i. More...
|
| |
| LogP | SampleX (Seq &seq, int nPos, bool bSample=true) |
| | [sample] Sample the x_i at position nPos More...
|
| |
| LogP | AISNormalize (int nLen, int nChain, int nInter) |
| | perform AIS to calculate the normalization constants, return the logz of given length More...
|
| |
| void | AISNormalize (int nLenMin, int nLenMax, int nChain, int nInter) |
| |
TRF model, revise the sample method to speedup the MCMC.
Definition at line 217 of file trf-model.h.