core/src/autogluon/core/utils/utils.py
def normalize_multi_probas(y_predprob, eps):
    """ Remaps the predicted probabilities to lie in (0,1) where eps controls how far from 0 smallest class-probability lies """
    min_predprob = np.min(y_predprob)
    if min_predprob < 0:  # ensure nonnegative rows
        most_negative_rowvals = np.clip(np.min(y_predprob, axis=1), a_min=None, a_max=0)
        y_predprob = y_predprob - most_negative_rowvals[:,None]
    if min_predprob < eps:
        y_predprob = np.clip(y_predprob, a_min=eps, a_max=None)  # ensure no entries < eps
        y_predprob = y_predprob / y_predprob.sum(axis=1, keepdims=1)  # renormalize
    return y_predprob
 Remaps the predicted probabilities to lie in (0,1) where eps controls how far from 0 smallest class-probability lies 
Remaps the predicted probabilities to lie in (0,1) where eps controls how far from 0 smallest class-probability lies
Remaps the predicted probabilities to lie in ( 0 1 ) where eps controls how far from 0 smallest class - probability lies
def normalize_multi_probas(y_predprob, eps):
    min_predprob = np.min(y_predprob)
    if min_predprob < 0:  
        most_negative_rowvals = np.clip(np.min(y_predprob, axis=1), a_min=None, a_max=0)
        y_predprob = y_predprob - most_negative_rowvals[:,None]
    if min_predprob < eps:
        y_predprob = np.clip(y_predprob, a_min=eps, a_max=None)  
        y_predprob = y_predprob / y_predprob.sum(axis=1, keepdims=1)  
    return y_predprob
def normalize_multi_probas ( y_predprob , eps ) : min_predprob = np . min ( y_predprob ) if min_predprob < 0 : most_negative_rowvals = np . clip ( np . min ( y_predprob , axis = 1 ) , a_min = None , a_max = 0 ) y_predprob = y_predprob - most_negative_rowvals [ : , None ] if min_predprob < eps : y_predprob = np . clip ( y_predprob , a_min = eps , a_max = None ) y_predprob = y_predprob / y_predprob . sum ( axis = 1 , keepdims = 1 ) return y_predprob
Remaps the predicted probabilities to lie in (0,1) where eps controls how far from 0 smallest class-probability lies
Remaps the predicted probabilities to lie in ( 0 1 ) where eps controls how far from 0 smallest class - probability lies
""" Remaps the predicted probabilities to lie in (0,1) where eps controls how far from 0 smallest class-probability lies """ # ensure nonnegative rows # ensure no entries < eps # renormalize
y_predprob
eps