class_docstr: Close implementation based on description in Nelson
  'Behavior of Machine Learning Algorithms in Adversarial Environments' Ch. 4.4
  
  | Textbook link: https://people.eecs.berkeley.edu/~adj/publications/paper-files/EECS-2010-140.pdf
class_docstr_tok: ["Close","implementation","based","on","description","in","Nelson","'Behavior","of","Machine","Learning","Algorithms","in","Adversarial","Environments","'","Ch",".","4.4","|","Textbook","link",":","https",":","\/\/people.eecs.berkeley.edu\/~adj\/publications\/paper-files\/EECS-2010-140.pdf"]
docstr: Returns confusion matrix.
  
  :param is_clean: Ground truth, where is_clean[i]=1 means that x_train[i] is clean and is_clean[i]=0 means
                   x_train[i] is poisonous.
  :param kwargs: A dictionary of defence-specific parameters.
  :return: JSON object with confusion matrix.
docstr_tok: ["Returns","confusion","matrix",".",":","param","is_clean",":","Ground","truth",",","where","is_clean","[","i","]","=1","means","that","x_train","[","i","]","is","clean","and","is_clean","[","i","]","=0","means","x_train","[","i","]","is","poisonous",".",":","param","kwargs",":","A","dictionary","of","defence-specific","parameters",".",":","return",":","JSON","object","with","confusion","matrix","."]
code: def evaluate_defence(self, is_clean: np.ndarray, **kwargs) -> str:
      """
      Returns confusion matrix.
  
      :param is_clean: Ground truth, where is_clean[i]=1 means that x_train[i] is clean and is_clean[i]=0 means
                       x_train[i] is poisonous.
      :param kwargs: A dictionary of defence-specific parameters.
      :return: JSON object with confusion matrix.
      """
      self.set_params(**kwargs)
      if len(self.is_clean_lst) == 0:
          self.detect_poison()
  
      if is_clean is None or len(is_clean) != len(self.is_clean_lst):
          raise ValueError("Invalid value for is_clean.")
  
      _, conf_matrix = self.evaluator.analyze_correctness([self.is_clean_lst], [is_clean])  # type: ignore
      return conf_matrix
  
file_path: adversarial-robustness-toolbox/art/defences/detector/poison/roni.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from copy import deepcopy
  from typing import Callable, List, Tuple, Union, TYPE_CHECKING
  import numpy
  from sklearn.model_selection import train_test_split
  from art.defences.detector.poison.ground_truth_evaluator import GroundTruthEvaluator
  from art.defences.detector.poison.poison_filtering_defence import PoisonFilteringDefence
  from art.utils import performance_diff
label_desc: Use image node_id 2 for calling the RONIDefense obj's underlying member method code with example usage: obj.evaluate_defence(is_clean) and returns: conf_matrix