true_pairs <- rbind(c(1,2), c(2,3), c(1,3)) # ground truth is 3-clique
pred_pairs <- rbind(c(1,2), c(2,3)) # prediction misses one edge
num_pairs <- 3 # assuming 3 elements
fowlkes_mallows_pairs(true_pairs, pred_pairs, num_pairs)
Run the code above in your browser using DataLab