core/src/autogluon/core/utils/utils.py
def normalize_binary_probas(y_predprob, eps):
    """ Remaps the predicted probabilities to open interval (0,1) while maintaining rank order """
    (pmin,pmax) = (eps, 1-eps)  # predicted probs outside this range will be remapped into (0,1)
    which_toobig = y_predprob > pmax
    if np.sum(which_toobig) > 0:  # remap overly large probs
        y_predprob = np.logical_not(which_toobig)*y_predprob + which_toobig*(1-(eps*np.exp(-(y_predprob-pmax))))
    which_toosmall = y_predprob < pmin
    if np.sum(which_toosmall) > 0:  # remap overly small probs
        y_predprob = np.logical_not(which_toosmall)*y_predprob + which_toosmall*eps*np.exp(-(pmin-y_predprob))
    return y_predprob
 Remaps the predicted probabilities to open interval (0,1) while maintaining rank order 
Remaps the predicted probabilities to open interval (0,1) while maintaining rank order
Remaps the predicted probabilities to open interval ( 0 1 ) while maintaining rank order
def normalize_binary_probas(y_predprob, eps):
    (pmin,pmax) = (eps, 1-eps)  
    which_toobig = y_predprob > pmax
    if np.sum(which_toobig) > 0:  
        y_predprob = np.logical_not(which_toobig)*y_predprob + which_toobig*(1-(eps*np.exp(-(y_predprob-pmax))))
    which_toosmall = y_predprob < pmin
    if np.sum(which_toosmall) > 0:  
        y_predprob = np.logical_not(which_toosmall)*y_predprob + which_toosmall*eps*np.exp(-(pmin-y_predprob))
    return y_predprob
def normalize_binary_probas ( y_predprob , eps ) : ( pmin , pmax ) = ( eps , 1 - eps ) which_toobig = y_predprob > pmax if np . sum ( which_toobig ) > 0 : y_predprob = np . logical_not ( which_toobig ) * y_predprob + which_toobig * ( 1 - ( eps * np . exp ( - ( y_predprob - pmax ) ) ) ) which_toosmall = y_predprob < pmin if np . sum ( which_toosmall ) > 0 : y_predprob = np . logical_not ( which_toosmall ) * y_predprob + which_toosmall * eps * np . exp ( - ( pmin - y_predprob ) ) return y_predprob
Remaps the predicted probabilities to open interval (0,1) while maintaining rank order
Remaps the predicted probabilities to open interval ( 0 1 ) while maintaining rank order
""" Remaps the predicted probabilities to open interval (0,1) while maintaining rank order """ # predicted probs outside this range will be remapped into (0,1) # remap overly large probs # remap overly small probs
y_predprob
eps