function amari_score = compute_amari_score(A,B)
    [~,k]  = size(B);
    A      = inv(A);
    B      = inv(B);
    A      = normr(A);
    B      = normr(B);
    % M      = abs(A/B);
    M      = abs(A*inv(B));
    sum_val = 0;
    for i=1:k
        sum_val = sum_val + (sum(M(i,:))/max(M(i,:))-1);
    end
    for i=1:k
        sum_val = sum_val + (sum(M(:,i))/max(M(:,i))-1);
    end
    amari_score = sum_val/(2*k);
end