def _sum_loglike_marginalized(self, L_vec, s2XTAcorrX, YTAcorrY_diag,
sXTAcorrY, half_log_det_X0TAX0,
log_weights, log_fixed_terms,
l_idx, n_C, n_T, n_V, n_X0,
n_grid, rank=None):
sum_LL_total = 0
sum_grad_L = np.zeros(np.size(l_idx[0]))
for subj in range(len(YTAcorrY_diag)):
LL_total, grad_L = self._loglike_marginalized(
L_vec, s2XTAcorrX[subj], YTAcorrY_diag[subj],
sXTAcorrY[subj], half_log_det_X0TAX0[subj], log_weights,
log_fixed_terms[subj], l_idx, n_C, n_T[subj],
n_V[subj], n_X0[subj], n_grid, rank)
sum_LL_total += LL_total
sum_grad_L += grad_L
return sum_LL_total, sum_grad_L
评论列表
文章目录