speed up frequency calculation
fix average precision calculation
fix ROC AUC calculation