Fixed a bug in the getPosterior in ConfusionMatrix