def nce_correct_prob(y_pred, y_noise):
    """
    p(correct| x, y) used in NCE.
    :param y_pred: Model distribution (p_m(y|x; \theta))
    :param y_noise: Noisy distribution (p_n(y|x))
    :return: Probability that a given example is predicted to be a correct training (p(correct|x, y))
    """
    return y_pred / (y_pred + y_noise)