class_docstr: Method from Chen et al., 2018 performing poisoning detection based on activations clustering.
  
  | Paper link: https://arxiv.org/abs/1811.03728
  
  | Please keep in mind the limitations of defences. For more information on the limitations of this
      defence, see https://arxiv.org/abs/1905.13409 . For details on how to evaluate classifier security
      in general, see https://arxiv.org/abs/1902.06705
docstr: Creates a 3D-plot to visualize each cluster each cluster is assigned a different color in the plot. When
  save=True, it also stores the 3D-plot per cluster in art.config.ART_DATA_PATH.
  
  :param save: Boolean specifying if image should be saved.
  :param folder: Directory where the sprites will be saved inside art.config.ART_DATA_PATH folder.
  :param kwargs: a dictionary of cluster-analysis-specific parameters.
docstr_tok: ["Creates","a","3D-plot","to","visualize","each","cluster","each","cluster","is","assigned","a","different","color","in","the","plot",".","When","save=True",",","it","also","stores","the","3D-plot","per","cluster","in","art.config.ART_DATA_PATH",".",":","param","save",":","Boolean","specifying","if","image","should","be","saved",".",":","param","folder",":","Directory","where","the","sprites","will","be","saved","inside","art.config.ART_DATA_PATH","folder",".",":","param","kwargs",":","a","dictionary","of","cluster-analysis-specific","parameters","."]
code: def plot_clusters(
      self, save: bool = True, folder: str = ".", **kwargs
  ) -> None:
      """
      Creates a 3D-plot to visualize each cluster each cluster is assigned a different color in the plot. When
      save=True, it also stores the 3D-plot per cluster in art.config.ART_DATA_PATH.
  
      :param save: Boolean specifying if image should be saved.
      :param folder: Directory where the sprites will be saved inside art.config.ART_DATA_PATH folder.
      :param kwargs: a dictionary of cluster-analysis-specific parameters.
      """
      self.set_params(**kwargs)
  
      if not self.clusters_by_class:
          self.cluster_activations()
  
      # Get activations reduced to 3-components:
      separated_reduced_activations = []
      for activation in self.activations_by_class:
          reduced_activations = reduce_dimensionality(
              activation, nb_dims=3
          )
          separated_reduced_activations.append(reduced_activations)
  
      # For each class generate a plot:
      for class_id, (labels, coordinates) in enumerate(
          zip(self.clusters_by_class, separated_reduced_activations)
      ):
          f_name = ""
          if save:
              f_name = os.path.join(
                  folder, "plot_class_" + str(class_id) + ".png"
              )
          plot_3d(coordinates, labels, save=save, f_name=f_name)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import pickle
  import time
  from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING
  import numpy
  from sklearn.cluster import KMeans, MiniBatchKMeans
  from art import config
  from art.data_generators import DataGenerator
  from art.defences.detector.poison.clustering_analyzer import ClusteringAnalyzer
  from art.defences.detector.poison.ground_truth_evaluator import GroundTruthEvaluator
  from art.defences.detector.poison.poison_filtering_defence import PoisonFilteringDefence
  from art.utils import segment_by_class
  from art.visualization import create_sprite, save_image, plot_3d
label_desc: Use image node_id 13 for calling the ActivationDefence obj's underlying member method code with example usage: obj.plot_clusters(save, folder) without return types