def second_peak_selectivity(self, d):
    '\n        Return the selectivity of the second peak in the distribution.\n\n        If the distribution has only one peak, return 0.0, and this value is\n        also usefl to discriminate the validity of second_peak_bin()\n        '
    l = len(d.keys())
    if (l <= 1):
        return 0.0
    p1 = d.max_value_bin()
    p2 = self.second_peak_bin(d)
    if (p1 == p2):
        return 0.0
    m = d.get_value(p2)
    proportion = d._safe_divide(m, sum(d.values()))
    offset = (1.0 / l)
    scaled = ((proportion - offset) / (1.0 - offset))
    return max(scaled, 0.0)
Return the selectivity of the second peak in the distribution.

If the distribution has only one peak, return 0.0, and this value is
also usefl to discriminate the validity of second_peak_bin()
def second_peak_selectivity(self, d):
    '\n        Return the selectivity of the second peak in the distribution.\n\n        If the distribution has only one peak, return 0.0, and this value is\n        also usefl to discriminate the validity of second_peak_bin()\n        '
    l = len(d.keys())
    if (l <= 1):
        return 0.0
    p1 = d.max_value_bin()
    p2 = self.second_peak_bin(d)
    if (p1 == p2):
        return 0.0
    m = d.get_value(p2)
    proportion = d._safe_divide(m, sum(d.values()))
    offset = (1.0 / l)
    scaled = ((proportion - offset) / (1.0 - offset))
    return max(scaled, 0.0)