Tilburg Thesis_Malawi School Dropout/src/thesis_utils_general.py
def clip_yprob(y_prob):
    """Clip yprob to avoid 0 or 1 values. Fixes bug in log_loss calculation
    that results in returning nan."""
    eps = 1e-15
    y_prob = np.array([x if x <= 1-eps else 1-eps for x in y_prob])
    y_prob = np.array([x if x >= eps else eps for x in y_prob])
    return y_prob
Clip yprob to avoid 0 or 1 values. Fixes bug in log_loss calculation
    that results in returning nan.
Clip yprob to avoid 0 or 1 values. Fixes bug in log_loss calculation
that results in returning nan.
Clip yprob to avoid 0 or 1 values . Fixes bug in log_loss calculation that results in returning nan .
def clip_yprob(y_prob):
    eps = 1e-15
    y_prob = np.array([x if x <= 1-eps else 1-eps for x in y_prob])
    y_prob = np.array([x if x >= eps else eps for x in y_prob])
    return y_prob
def clip_yprob ( y_prob ) : eps = 1e-15 y_prob = np . array ( [ x if x <= 1 - eps else 1 - eps for x in y_prob ] ) y_prob = np . array ( [ x if x >= eps else eps for x in y_prob ] ) return y_prob
Clip yprob to avoid 0 or 1 values.
Clip yprob to avoid 0 or 1 values .
"""Clip yprob to avoid 0 or 1 values. Fixes bug in log_loss calculation
    that results in returning nan."""
y_prob