'Constructs a minibatch sampler.
Args:
positive_fraction: desired fraction of positive examples (scalar in [0,1])
Raises:
ValueError: if positive_fraction < 0, or positive_fraction > 1'

def __init__(self, positive_fraction=0.5):

    if ((positive_fraction < 0) or (positive_fraction > 1)):
        raise ValueError(('positive_fraction    should    be    in    range    [0,1].    Received:    %s.' % positive_fraction))
    self._positive_fraction = positive_fraction
