code: def test_evaluate(self):
      t = self.dtrain[self.target]
      c = self.model.predict(self.dtrain, "class")
      p = self.model.predict(self.dtrain, "probability_vector")
      ans_metrics = [
          "accuracy",
          "auc",
          "confusion_matrix",
          "f1_score",
          "log_loss",
          "precision",
          "recall",
          "roc_curve",
      ]
      self.sm_metrics = {
          "accuracy": tc.toolkits.evaluation.accuracy(t, c),
          "auc": tc.toolkits.evaluation.auc(t, p),
          "confusion_matrix": tc.toolkits.evaluation.confusion_matrix(
              t, c
          ),
          "f1_score": tc.toolkits.evaluation.f1_score(t, c),
          "log_loss": tc.toolkits.evaluation.log_loss(t, p),
          "precision": tc.toolkits.evaluation.precision(t, c),
          "recall": tc.toolkits.evaluation.recall(t, c),
          "roc_curve": tc.toolkits.evaluation.roc_curve(t, p),
      }
      model = self.model
  
      def check_cf_matrix(ans):
          self.assertTrue(ans is not None)
          self.assertTrue("confusion_matrix" in ans)
          cf = ans["confusion_matrix"].sort(
              ["target_label", "predicted_label"]
          )
          ans_cf = self.sm_metrics["confusion_matrix"].sort(
              ["target_label", "predicted_label"]
          )
          self.assertEqual(list(cf["count"]), list(ans_cf["count"]))
  
      def check_roc_curve(ans):
          self.assertTrue(ans is not None)
          self.assertTrue("roc_curve" in ans)
          roc = ans["roc_curve"]
          self.assertEqual(type(roc), tc.SFrame)
  
      def check_metric(ans, metric):
          if metric == "confusion_matrix":
              check_cf_matrix(ans)
          elif metric == "roc_curve":
              check_roc_curve(ans)
          else:
              self.assertTrue(ans is not None)
              self.assertTrue(metric in ans)
              self.assertAlmostEqual(
                  ans[metric],
                  self.sm_metrics[metric],
                  places=4,
                  msg="%s = (%s,%s)"
                  % (metric, ans[metric], self.sm_metrics[metric]),
              )
  
      # Default
      ans = model.evaluate(self.dtrain)
      self.assertEqual(sorted(ans.keys()), sorted(ans_metrics))
      for m in ans_metrics:
          check_metric(ans, m)
  
      # Individual
      for m in ans_metrics:
          ans = model.evaluate(self.dtrain, metric=m)
          check_metric(ans, m)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
  import math
  import uuid
  import random
  import sys
  import copy
  from turicreate.toolkits import evaluation
  from turicreate.toolkits._main import ToolkitError
  import shutil
  import numpy
  from array import array
  import os
label_desc: Use image node_id 10 for calling the RandomForestClassifierTest obj's underlying member method code with example usage: obj.test_evaluate() without return types