code: def test_none_probabilities(self):
      # Test the case when probabilities are integer (sigh!)
      y = turicreate.SArray([0, 1, 2, 0])
      yhat = turicreate.SArray(
          [[1, 0, None], [1, 0, None], [0, 1, None], [0, 0, None]]
      )
  
      with self.assertRaises(TypeError):
          log_loss = turicreate.toolkits.evaluation.log_loss(y, yhat)
      with self.assertRaises(TypeError):
          auc = turicreate.toolkits.evaluation.auc(y, yhat)
      with self.assertRaises(TypeError):
          roc_curve = turicreate.toolkits.evaluation.roc_curve(y, yhat)
  
      # Test the case when probabilities are integer (sigh!)
      y = turicreate.SArray([0, 1, 2, 0])
      yhat = turicreate.SArray(
          [[0.9, 0.0, 0.0], [0.9, 0.1, 0.0], None, [0.0, 0.1, 0.9]]
      )
  
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.log_loss(y, yhat)
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.auc(y, yhat)
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.roc_curve(y, yhat)
  
      # Test the case when probabilities are integer (sigh!)
      y = turicreate.SArray([0, 1, 0, 0])
      yhat = turicreate.SArray([0, 1, 0, None])
  
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.log_loss(y, yhat)
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.auc(y, yhat)
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.roc_curve(y, yhat)
  
      # Test the case when probabilities are integer (sigh!)
      y = turicreate.SArray([0, 1, 0, 0])
      yhat = turicreate.SArray([0.1, 0.1, 0.9, None])
  
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.log_loss(y, yhat)
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.auc(y, yhat)
      with self.assertRaises(ToolkitError):
          turicreate.toolkits.evaluation.roc_curve(y, yhat)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
  from turicreate.toolkits._main import ToolkitError
  import math
  from numpy import inf
  import numpy
label_desc: Use image node_id 6 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_none_probabilities() without return types