vpyp
vpyp copied to clipboard
Pitman-Yor processes in python
In `prior.py`, in the `sample_parameters` and `proposal_log_likelihood` functions for gamma and beta priors: Gamma: ```python def sample_parameters(self): self.x = random.gammavariate(1, self.x) # Mean: x if self.x
I noticed that the perplexity is calculated in the following way: `ppl = math.exp(-ll/(n_sentences + n_words - n_oovs))` in `eval.py` However, in the book Speech and Language Processing https://web.stanford.edu/~jurafsky/slp3/4.pdf, the...
hello, I'm trying to generate a probability vector using Pitman-Yor process and it might be a bit dumb but, how could I use your code in order to generate it?...