class_docstr: Binary detector of adversarial samples coming from evasion attacks. The detector uses an architecture provided by
  the user and is trained on the values of the activations of a classifier at a given layer.
class_docstr_tok: ["Binary","detector","of","adversarial","samples","coming","from","evasion","attacks",".","The","detector","uses","an","architecture","provided","by","the","user","and","is","trained","on","the","values","of","the","activations","of","a","classifier","at","a","given","layer","."]
docstr: Fit the detector using training data.
  
  :param x: Training set to fit the detector.
  :param y: Labels for the training set.
  :param batch_size: Size of batches.
  :param nb_epochs: Number of epochs to use for training.
  :param kwargs: Other parameters.
docstr_tok: ["Fit","the","detector","using","training","data",".",":","param","x",":","Training","set","to","fit","the","detector",".",":","param","y",":","Labels","for","the","training","set",".",":","param","batch_size",":","Size","of","batches",".",":","param","nb_epochs",":","Number","of","epochs","to","use","for","training",".",":","param","kwargs",":","Other","parameters","."]
code: def fit(
      self,
      x: np.ndarray,
      y: np.ndarray,
      batch_size: int = 128,
      nb_epochs: int = 20,
      **kwargs,
  ) -> None:
      """
      Fit the detector using training data.
  
      :param x: Training set to fit the detector.
      :param y: Labels for the training set.
      :param batch_size: Size of batches.
      :param nb_epochs: Number of epochs to use for training.
      :param kwargs: Other parameters.
      """
      x_activations: np.ndarray = self._get_activations(
          x, self._layer_name, batch_size
      )
      self.detector.fit(
          x_activations,
          y,
          batch_size=batch_size,
          nb_epochs=nb_epochs,
          **kwargs,
      )
  
file_path: adversarial-robustness-toolbox/art/defences/detector/evasion/binary_activation_detector.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Tuple, Union, TYPE_CHECKING
  import numpy
  from art.defences.detector.evasion.evasion_detector import EvasionDetector
label_desc: Use image node_id 3 for calling the BinaryActivationDetector obj's underlying member method code with example usage: obj.fit(x, y, batch_size, nb_epochs) without return types