function [infid] = eval_decomp(f,x_perturbed,p_full,explained_change,params,bin_edges)

    samp = size(x_perturbed,1);
    infid = zeros(samp,1);

    fx_perturbed = f(x_perturbed,params,bin_edges);
    fx_change    = p_full - fx_perturbed;
    infid = mean(mean((explained_change - fx_change).^2));
    % for i = 1:samp
    %     fx_perturbed = f(x_perturbed(i,:),params,bin_edges);
    %     fx_change = p_full - fx_perturbed;
    %     infid(i) = mean((explained_change(i,:)-fx_change ).^2);
    % end

end