In positive-unlabelled (PU) learning, every labelled example is positive (s=1  ⟹  y=1), and each true positive is labelled independently of its features with constant probability c=P(s=1∣y=1,x)=P(s=1∣y=1)>0. How do you express the true posterior P(y=1∣x) in terms of the observed-label posterior P(s=1∣x) and c, and how can c be estimated from a held-out set of labelled positives?

Foundations, Learning setup
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can apply Bayes' rule and the selected-completely-at-random (SCAR) assumption to recover calibrated positive probabilities without negative labels.

Key idea

Because negatives are never labelled (P(s=1∣y=0,x)=0), the probability of seeing a label at x factors as P(s=1∣x)=c P(y=1∣x), so a classifier trained on labelled-vs-unlabelled data only needs rescaling by 1/c.

Steps

  1. Expand P(s=1∣x) over the unobserved true label y∈{0,1}: P(s=1∣x)=P(s=1∣y=1,x)P(y=1∣x)+P(s=1∣y=0,x)P(y=0∣x).
  2. Apply the two PU conditions: P(s=1∣y=0,x)=0 (no false-positive labels) and P(s=1∣y=1,x)=c (SCAR assumption). This simplifies to P(s=1∣x)=c P(y=1∣x), hence P(y=1∣x)=P(s=1∣x)c. Note that for thresholding or ranking, any monotone score of P(s=1∣x) already orders x identically to P(y=1∣x).
  3. Estimate c using a held-out validation set V+ of labelled positives, assuming positive and negative classes do not overlap on V+ (so P(y=1∣x)=1 for x∈V+): then P(s=1∣x)=c⋅1=c for every x∈V+.
  4. Train a calibrated binary classifier g^(x)≈P(s=1∣x) treating labelled (s=1) as positive and unlabelled (s=0) as negative, and estimate c^=1∣V+∣∑x∈V+g^(x). Then predict P^(y=1∣x)=min⁡ ⁣(1,  g^(x)/c^).

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Foundations: Consider a d-dimensional unit-radius hypersphere inscribed inside the hypercube [−1,1]d. Using the hypersphere volume Vd(r)=πd/2Γ(d/2+1)rd (where Γ(k+1)=k! for an integer k), what fraction of the hypercube's volume does the sphere occupy for d=2, 4 and 10, and what does this imply about uniformly sampled points in high dimensions?
Next in Foundations: Consider a conjunctive hypothesis space over three binary attributes A1,A2,A3∈{1,2}. What sequences of specific boundaries S and general boundaries G does the candidate-elimination algorithm produce on the four examples (1,1,1,+), (2,2,2,−), (1,2,1,+) and (2,1,1,−), and which hypotheses remain in the final version space?