function u = computefLocalPrior(y, yExpected)

u = 0;
n = length(y);

for i = 1:n

%     u = u + 1/(n) * norm( (y{i} - yExpected{i}' ) * ones(size(y{i}, 2), 1), 2)^2;

    u = u + size(yExpected{i}, 1)/(n) * norm( (y{i} - yExpected{i}' ) * ones(size(y{i}, 2), 1), 2)^2;end

end