def get_ind_mat_average_uniqueness(ind_mat):
    """
    Snippet 4.4. page 65, Compute Average Uniqueness
    Average uniqueness from indicator matrix

    :param ind_mat: (np.matrix) indicator binary matrix
    :return: (float) average uniqueness
    """
    concurrency = ind_mat.sum(axis=1)
    uniqueness = ind_mat.T / concurrency

    avg_uniqueness = uniqueness[uniqueness > 0].mean()

    return avg_uniqueness