where A and B are the sets of fingerprints of the two molecules and b A , b B , b A∩B are the number of fingerprints in the set A, B, A ∩ B. To label compounds with a small similarity to the target compound j ∈ [1, n], we defined the label L i for compound i in the training data using the set of fingerprints A j as follows: