Added predicted class calculation