online-hdp
online-hdp copied to clipboard
details about the code
In the code, when calculating the doc-level parameters, the solution is
if iter < 3:
var_phi = np.dot(phi.T, (Elogbeta_doc * doc.counts).T)
(log_var_phi, log_norm) = utils.log_normalize(var_phi)
var_phi = np.exp(log_var_phi)
else:
var_phi = np.dot(phi.T, (Elogbeta_doc * doc.counts).T) + Elogsticks_1st
(log_var_phi, log_norm) = utils.log_normalize(var_phi)
var_phi = np.exp(log_var_phi)
Why it calculate parameters in this way?(different solutions between iter<3 and iter>=3)
I just deleted iter<3
condition, and left the else
condition. The result shows it is more difficult to converge. Is it the main reason?
In the code, when calculating the doc-level parameters, the solution is
if iter < 3:
var_phi = np.dot(phi.T, (Elogbeta_doc * doc.counts).T)
(log_var_phi, log_norm) = utils.log_normalize(var_phi)
var_phi = np.exp(log_var_phi)
else:
var_phi = np.dot(phi.T, (Elogbeta_doc * doc.counts).T) + Elogsticks_1st
(log_var_phi, log_norm) = utils.log_normalize(var_phi)
var_phi = np.exp(log_var_phi)
Why it calculate parameters in this way?(different solutions between iter<3 and iter>=3)
hello, did you solve the problem and Implement the HDP model? if you solved,could you tell me more details? thank you very much.
这是来自QQ邮箱的假期自动回复邮件。我会尽快给你回复,请耐心等待。