class_docstr: Abstract Classification Model
class_docstr_tok: ["Abstract","Classification","Model"]
code: def evaluate(
      self,  # type: ignore[override]
      x_data: TextSamplesVar,
      y_data: Union[
          ClassificationLabelVar, MultiLabelClassificationLabelVar
      ],
      *,
      batch_size: int = 32,
      digits: int = 4,
      multi_label_threshold: float = 0.5,
      truncating: bool = False,
  ) -> Dict:
      y_pred = self.predict(
          x_data,
          batch_size=batch_size,
          truncating=truncating,
          multi_label_threshold=multi_label_threshold,
      )
  
      if self.multi_label:
          report = multi_label_classification_report(
              y_data,  # type: ignore
              y_pred,  # type: ignore
              binarizer=self.label_processor.multi_label_binarizer,
          )  # type: ignore
  
      else:
          original_report = sklearn_metrics.classification_report(
              y_data, y_pred, output_dict=True, digits=digits
          )
          print(
              sklearn_metrics.classification_report(
                  y_data, y_pred, output_dict=False, digits=digits
              )
          )
          report = {
              "detail": original_report,
              **original_report["weighted avg"],
          }
      return report
  
imports: import random
  from abc import ABC
  import numpy
  from typing import List, Dict, Any, Union
  from sklearn import metrics
  from tensorflow import keras
  import kashgari
  from kashgari.embeddings import ABCEmbedding, BareEmbedding
  from kashgari.generators import BatchDataSet, CorpusGenerator
  from kashgari.layers import L
  from kashgari.logger import logger
  from kashgari.metrics.multi_label_classification import multi_label_classification_report
  from kashgari.processors import ABCProcessor
  from kashgari.processors import ClassificationProcessor
  from kashgari.processors import SequenceProcessor
  from kashgari.tasks.abs_task_model import ABCTaskModel
  from kashgari.types import TextSamplesVar, ClassificationLabelVar, MultiLabelClassificationLabelVar
label_desc: Use image node_id 11 for calling the ABCClassificationModel obj's underlying member method code with example usage: obj.evaluate(x_data, y_data) and returns: report