Error while creating confusion matrix

User 5178 | 5/7/2016, 10:08:11 AM

I am simply repeating the code on this link (https://dato.com/products/create/docs/generated/graphlab.evaluation.confusionmatrix.html#graphlab.evaluation.confusionmatrix) but it is giving me the error that predictions cannot be of type float

targets = graphlab.SArray([0, 1, 1, 0]) predictions = graphlab.SArray([0.1, 0.35, 0.7, 0.99]) graphlab.evaluation.confusion_matrix(targets, predictions) TypeError: Input predictions cannot be an SArray of type float

Comments

User 2506 | 5/8/2016, 2:12:58 AM

Hi Muhammad,

Thanks for reporting this. We will look into this.

Meanwhile, can you make sure your targets and predictions are of the same integer type? This will unblock you.