Dep dataset has only one record per ID, classProbDist has as many as number of classes for the same instance (identified by "id" in both datasets). Since both datasets could be large enough to not use LOOKUP, I think distribute both by id and then JOIN locally would speed up the process for large datasets. It is necessary to SORT the result by "score" in order to ITERATE operation returns a meaningful result. However, the TABLE operation doesn't  need the data ordered and a MERGE option would take advantage of the distribution.

coi_tot:= TABLE(compared, {classifier, c_modeled, totPos:= COUNT(GROUP, c_actual = c_modeled), totNeg:= COUNT(GROUP, c_actual<>c_modeled)}, classifier, c_modeled, MERGE);