def pr_one_unlabeled(y_true, y_pred):
    """
    probability that unabeleds are predicted to be class == 1
    """
    unlabeled_pos = sum([t == -1 and p == 1 for t, p in zip(y_true, y_pred)])
    unlabeled_n = (y_true == -1).sum()

    if unlabeled_n == 0:
        #no unlabeleds, so no pr
        return 0.0
    else:
        return unlabeled_pos / unlabeled_n