Explore modules

Positive–Unlabeled Risk Correction

Separate positive and unlabeled loss terms without pretending missing labels are negatives.

Free theory article

Separate positive and unlabeled loss terms without pretending missing labels are negatives.

Concept & interpretation

In Positive-Unlabeled (PU) learning, we only have access to a set of labeled positive examples and a set of unlabeled examples, which are a mixture of both positive and negative instances. A naive approach treats unlabeled data as negative instances, which biases the model. The unbiased PU learning approach rewrites the expected risk over the true negative distribution using only the positive and unlabeled marginal distributions, based on an assumed positive class prior.

Experiment: Interactive Estimation

Use the Positive–Unlabeled Risk Correction module to explore how the risk estimate changes with different model parameters.

  1. Start with the default settings: Weight = 2, Bias = 0, and Positive prior = 0.5. Observe the unbiased PU risk is negative because the estimated negative contribution drops below zero.
  2. Change the Positive prior to 0.75. Notice how the expected contribution from true positives to the unlabeled negative loss increases, driving the estimated negative contribution even further negative (-0.9077). The Nonnegative PU Risk corrects this by clamping the contribution.
  3. Set Weight = 0 and Bias = 0. The model assigns a score of 0 to all points. Both ell_plus and ell_minus evaluate to log(2) ≈ 0.6931. The unbiased risk exactly equals this constant, and no non-negativity correction is needed.
Read the full free theory article