added function to calculate confusion matrix. kmedoids is behaving in a strange way, it does not recognise seed when not in the loop