class_docstr: Fast generalized subset scan based detector by McFowland, E., Speakman, S., and Neill, D. B. (2013).
  
  | Paper link: https://www.cs.cmu.edu/~neill/papers/mcfowland13a.pdf
class_docstr_tok: ["Fast","generalized","subset","scan","based","detector","by","McFowland",",","E.",",","Speakman",",","S.",",","and","Neill",",","D.","B",".","(","2013",")",".","|","Paper","link",":","https",":","\/\/www.cs.cmu.edu\/~neill\/papers\/mcfowland13a.pdf"]
code: def _get_activations(
      self,
      x: np.ndarray,
      layer: Union[int, str],
      batch_size: int,
      framework: bool = False,
  ) -> np.ndarray:
      x_activations = self.classifier.get_activations(
          x, layer, batch_size, framework
      )
      if x_activations is None:
          raise ValueError("Classifier activations are null.")
  
      if isinstance(x_activations, np.ndarray):
          return x_activations
  
      return x_activations.numpy()
  
file_path: adversarial-robustness-toolbox/art/defences/detector/evasion/subsetscanning/detector.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import sys
  from typing import Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from sklearn import metrics
  from tqdm.auto import trange, tqdm
  from art.defences.detector.evasion.evasion_detector import EvasionDetector
  from art.defences.detector.evasion.subsetscanning.scanner import Scanner
  from art.defences.detector.evasion.subsetscanning.scoring_functions import ScoringFunctions
label_desc: Use image node_id 2 for calling the SubsetScanningDetector obj's underlying member method code with example usage: obj._get_activations(x, layer, batch_size, framework) and returns: x_activations, x_activations