% You can assume n_plus and n_minus are never 0 together
%
function score = bic_model_score(n_plus, n_minus)

K = length(n_plus);
n = n_plus + n_minus;

% maximum likelihood probabilities
Pml = n_plus./n;
Pml(n_plus == 0) = eps; % so that you don't have to deal with 0/1 probs
Pml(n_minus == 0) = 1 - eps;

%
% YOU MUST FILL IN THE SCORE COMPUTATION
%
% We have already computed the Maximum Likelihood probabilities above,
% and helped avoid dealing with the special cases where either 
% n_plus(i) or n_minus(i) is 0. 
%
% The number of effective parameters is K, because this function will
% only receive the nodes for which n_plus(i) and n_minus(i) are never 0 together.

score = 