function loglik = log_lik_batch(bnet, observed_nodes, observed_values, lens)
%
% Compute the log likelihood of a batch of data

% This is just like learn_params, except we don't do an M step.

loglik = 0;
num_cases = length(observed_nodes);
if nargin < 4, lens = ones(1,num_cases); end % dummy value for non-DBNs
for l=1:num_cases
  [bnet, ll] = enter_evidence(bnet, observed_nodes{l}, observed_values{l}, lens(l));
  loglik = loglik + ll;
end
