You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,master:
Thanks for you code which give me more thought. I'am a new scholar in learning hdp-model.when i understand the code in your iir/lda/hdplda.py ,the row of 252 and 253 makes me puzzle.when we sample k,what is the mean of 'log_p_k[i]' and 'log_p_k[K]'.
Otherwise,the code 'k_new = self.sampling_topic(numpy.exp(log_p_k - log_p_k.max()))',should i change 'log_p_k.max()' to 'log_p_k.sum()'.can you tell me the program process or formula about that.thanks!
The text was updated successfully, but these errors were encountered:
Subtracting the maximum is to suppress overflow/underflow.
It gives the same result if the maximum is replaced with any value as long as no overflow/underflow.
Check an implementation of softmax function if you want to know more detail.
Thanks.
Hello,master:
Thanks for you code which give me more thought. I'am a new scholar in learning hdp-model.when i understand the code in your iir/lda/hdplda.py ,the row of 252 and 253 makes me puzzle.when we sample k,what is the mean of 'log_p_k[i]' and 'log_p_k[K]'.
Otherwise,the code 'k_new = self.sampling_topic(numpy.exp(log_p_k - log_p_k.max()))',should i change 'log_p_k.max()' to 'log_p_k.sum()'.can you tell me the program process or formula about that.thanks!
The text was updated successfully, but these errors were encountered: