def calculate_theta(self, Xm, p_y_given_x):
"""Estimate marginal parameters from data and expected latent labels."""
theta = []
for i in range(self.n_visible):
not_missing = np.logical_not(ma.getmaskarray(Xm)[:, i])
theta.append(self.estimate_parameters(Xm.data[not_missing, i], p_y_given_x[:, not_missing]))
return np.array(theta)
评论列表
文章目录