Skip to main content
. Author manuscript; available in PMC: 2024 Dec 23.
Published in final edited form as: Intell Based Med. 2024 Jul 5;10:100154. doi: 10.1016/j.ibmed.2024.100154

Algorithm 1:

Bagging PU learning

Input: positive group P, unlabeled group U, size of the bootstrap samples K, and number of bootstrap samples B
Output: a function p(xu) to assign a probability of being positive to each xuU
fxu=0,nxu=0xuU//Initialize the accumulators
for b=1 to B do:
 Draw a bootstrap sample Ub of size K from U
 Treat Ub as negative and train a classifier fb to discriminate P from Ub
 Apply fb to generate a probability fbxu of being positive for all xuUUb
 Update:
  fxu=fxu+fbxu,nxu=nxu+1,xuUUb
end for
Return pxu=fxunxuxuU