# Path: distributions/dbg/special.py

# 
# Path: distributions/dbg/random.py
# def sample_discrete_log(scores):
#     probs = scores_to_probs(scores)
#     return sample_discrete(probs, total=1.0)


from distributions.dbg.special import log
from distributions.dbg.random import sample_discrete_log
from distributions.mixins import SharedIoMixin
        24.15668300, 27.58456586, 31.09958507, 34.69462231, 38.36364086,
        42.10145572, 45.90356476, 49.76602176, 53.68533918, 57.65841234,
        61.68245958, 65.75497413, 69.87368527, 74.03652635, 78.24160846,
        82.48719834, 86.77169993, 91.09363859, 95.45164780, 99.84445762,
        104.27088480, 108.72982416, 113.22024112, 117.74116515, 122.29168392,
        126.87093829, 131.47811772, 136.11245629, 140.77322911, 145.45974907,
        150.17136399, 154.90745399, 159.66742919, 164.45072752, 169.25681285,
        174.08517319, 178.93531914, 183.80678238
    ]

    def _approximate_postpred_correction(self, sample_size):
        '''
        ad hoc approximation,
        see `python derivations/clustering.py postpred`
        see `python derivations/clustering.py approximations`
        '''
        assert 0 < sample_size
        assert sample_size < self.dataset_size

        exponent = 0.45 - 0.1 / sample_size - 0.1 / self.dataset_size
        scale = self.dataset_size / sample_size
        return log(scale) * exponent

    def _approximate_dataprob_correction(self, sample_size):
        '''
        ad hoc approximation,
        see `python derivations/clustering.py dataprob`
        see `python derivations/clustering.py approximations`
        '''
        n = log(sample_size)

# Path: distributions/dbg/special.py

# 
# Path: distributions/dbg/random.py
# def sample_discrete_log(scores):
#     probs = scores_to_probs(scores)
#     return sample_discrete(probs, total=1.0)


# Path: distributions/dbg/clustering.py
from distributions.dbg.special import log
from distributions.dbg.random import sample_discrete_log
from distributions.mixins import SharedIoMixin

        24.15668300, 27.58456586, 31.09958507, 34.69462231, 38.36364086,
        42.10145572, 45.90356476, 49.76602176, 53.68533918, 57.65841234,
        61.68245958, 65.75497413, 69.87368527, 74.03652635, 78.24160846,
        82.48719834, 86.77169993, 91.09363859, 95.45164780, 99.84445762,
        104.27088480, 108.72982416, 113.22024112, 117.74116515, 122.29168392,
        126.87093829, 131.47811772, 136.11245629, 140.77322911, 145.45974907,
        150.17136399, 154.90745399, 159.66742919, 164.45072752, 169.25681285,
        174.08517319, 178.93531914, 183.80678238
    ]

    def _approximate_postpred_correction(self, sample_size):
        '''
        ad hoc approximation,
        see `python derivations/clustering.py postpred`
        see `python derivations/clustering.py approximations`
        '''
        assert 0 < sample_size
        assert sample_size < self.dataset_size

        exponent = 0.45 - 0.1 / sample_size - 0.1 / self.dataset_size
        scale = self.dataset_size / sample_size
        return log(scale) * exponent

    def _approximate_dataprob_correction(self, sample_size):
        '''
        ad hoc approximation,
        see `python derivations/clustering.py dataprob`
        see `python derivations/clustering.py approximations`
        '''
        n = log(sample_size)

        N = log(self.dataset_size)