class_docstr: Intercluster distance maps display an embedding of the cluster centers in
  2 dimensions with the distance to other centers preserved. E.g. the closer
  to centers are in the visualization, the closer they are in the original
  feature space. The clusters are sized according to a scoring metric. By
  default, they are sized by membership, e.g. the number of instances that
  belong to each center. This gives a sense of the relative importance of
  clusters. Note however, that because two clusters overlap in the 2D space,
  it does not imply that they overlap in the original feature space.
  
  Parameters
  ----------
  estimator : a Scikit-Learn clusterer
      Should be an instance of a centroidal clustering algorithm (or a
      hierarchical algorithm with a specified number of clusters). Also
      accepts some other models like LDA for text clustering.
      If it is not a clusterer, an exception is raised. If the estimator
      is not fitted, it is fit when the visualizer is fitted, unless
      otherwise specified by ``is_fitted``.
  
  ax : matplotlib Axes, default: None
      The axes to plot the figure on. If None is passed in the current axes
      will be used (or generated if required).
  
  min_size : int, default: 400
      The size, in points, of the smallest cluster drawn on the graph.
      Cluster sizes will be scaled between the min and max sizes.
  
  max_size : int, default: 25000
      The size, in points, of the largest cluster drawn on the graph.
      Cluster sizes will be scaled between the min and max sizes.
  
  embedding : default: 'mds'
      The algorithm used to embed the cluster centers in 2 dimensional space
      so that the distance between clusters is represented equivalently to
      their relationship in feature spaceself.
      Embedding algorithm options include:
  
      - **mds**: multidimensional scaling
      - **tsne**: stochastic neighbor embedding
  
  scoring : default: 'membership'
      The scoring method used to determine the size of the clusters drawn on
      the graph so that the relative importance of clusters can be viewed.
      Scoring method options include:
  
      - **membership**: number of instances belonging to each cluster
  
  legend : bool, default: True
      Whether or not to draw the size legend onto the graph, omit the legend
      to more easily see clusters that overlap.
  
  legend_loc : str, default: "lower left"
      The location of the legend on the graph, used to move the legend out
      of the way of clusters into open space. The same legend location
      options for matplotlib are used here.
  
      .. seealso:: https://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend
  
  legend_size : float, default: 1.5
      The size, in inches, of the size legend to inset into the graph.
  
  random_state : int or RandomState, default: None
      Fixes the random state for stochastic embedding algorithms.
  
  is_fitted : bool or str, default='auto'
      Specify if the wrapped estimator is already fitted. If False, the estimator
      will be fit when the visualizer is fit, otherwise, the estimator will not be
      modified. If 'auto' (default), a helper method will check if the estimator
      is fitted before fitting it again.
  
  kwargs : dict
      Keyword arguments passed to the base class and may influence the
      feature visualization properties.
  
  Attributes
  ----------
  cluster_centers_ : array of shape (n_clusters, n_features)
      The computed cluster centers from the underlying model.
  
  embedded_centers_ : array of shape (n_clusters, 2)
      The positions of all the cluster centers on the graph.
  
  scores_ : array of shape (n_clusters,)
      The scores of each cluster that determine its size on the graph.
  
  fit_time_ : Timer
      The time it took to fit the clustering model and perform the embedding.
  
  Notes
  -----
  Currently the only two embeddings supported are MDS and TSNE. Soon to
  follow will be PCoA and a customized version of PCoA for LDA. The only
  supported scoring metric is membership, but in the future, silhouette
  scores and cluster diameter will be added.
  
  In terms of algorithm support, right now any clustering algorithm that has
  a learned ``cluster_centers_`` and ``labels_`` attribute will work with
  the visualizer. In the future, we will update this to work with hierarchical
  clusterers that have ``n_components`` and LDA.
class_docstr_tok: ["Intercluster","distance","maps","display","an","embedding","of","the","cluster","centers","in","2","dimensions","with","the","distance","to","other","centers","preserved",".","E.g",".","the","closer","to","centers","are","in","the","visualization",",","the","closer","they","are","in","the","original","feature","space",".","The","clusters","are","sized","according","to","a","scoring","metric",".","By","default",",","they","are","sized","by","membership",",","e.g",".","the","number","of","instances","that","belong","to","each","center",".","This","gives","a","sense","of","the","relative","importance","of","clusters",".","Note","however",",","that","because","two","clusters","overlap","in","the","2D","space",",","it","does","not","imply","that","they","overlap","in","the","original","feature","space",".","Parameters","--","--","--","--","--","estimator",":","a","Scikit-Learn","clusterer","Should","be","an","instance","of","a","centroidal","clustering","algorithm","(","or","a","hierarchical","algorithm","with","a","specified","number","of","clusters",")",".","Also","accepts","some","other","models","like","LDA","for","text","clustering",".","If","it","is","not","a","clusterer",",","an","exception","is","raised",".","If","the","estimator","is","not","fitted",",","it","is","fit","when","the","visualizer","is","fitted",",","unless","otherwise","specified","by","``","is_fitted","``",".","ax",":","matplotlib","Axes",",","default",":","None","The","axes","to","plot","the","figure","on",".","If","None","is","passed","in","the","current","axes","will","be","used","(","or","generated","if","required",")",".","min_size",":","int",",","default",":","400","The","size",",","in","points",",","of","the","smallest","cluster","drawn","on","the","graph",".","Cluster","sizes","will","be","scaled","between","the","min","and","max","sizes",".","max_size",":","int",",","default",":","25000","The","size",",","in","points",",","of","the","largest","cluster","drawn","on","the","graph",".","Cluster","sizes","will","be","scaled","between","the","min","and","max","sizes",".","embedding",":","default",":","'mds'","The","algorithm","used","to","embed","the","cluster","centers","in","2","dimensional","space","so","that","the","distance","between","clusters","is","represented","equivalently","to","their","relationship","in","feature","spaceself",".","Embedding","algorithm","options","include",":","-","*","*","mds","*","*",":","multidimensional","scaling","-","*","*","tsne","*","*",":","stochastic","neighbor","embedding","scoring",":","default",":","'membership'","The","scoring","method","used","to","determine","the","size","of","the","clusters","drawn","on","the","graph","so","that","the","relative","importance","of","clusters","can","be","viewed",".","Scoring","method","options","include",":","-","*","*","membership","*","*",":","number","of","instances","belonging","to","each","cluster","legend",":","bool",",","default",":","True","Whether","or","not","to","draw","the","size","legend","onto","the","graph",",","omit","the","legend","to","more","easily","see","clusters","that","overlap",".","legend_loc",":","str",",","default",":","``","lower","left","''","The","location","of","the","legend","on","the","graph",",","used","to","move","the","legend","out","of","the","way","of","clusters","into","open","space",".","The","same","legend","location","options","for","matplotlib","are","used","here",".","..","seealso",":",":","https",":","\/\/matplotlib.org\/api\/pyplot_api.html","#","matplotlib.pyplot.legend","legend_size",":","float",",","default",":","1.5","The","size",",","in","inches",",","of","the","size","legend","to","inset","into","the","graph",".","random_state",":","int","or","RandomState",",","default",":","None","Fixes","the","random","state","for","stochastic","embedding","algorithms",".","is_fitted",":","bool","or","str",",","default='auto'","Specify","if","the","wrapped","estimator","is","already","fitted",".","If","False",",","the","estimator","will","be","fit","when","the","visualizer","is","fit",",","otherwise",",","the","estimator","will","not","be","modified",".","If","'auto","'","(","default",")",",","a","helper","method","will","check","if","the","estimator","is","fitted","before","fitting","it","again",".","kwargs",":","dict","Keyword","arguments","passed","to","the","base","class","and","may","influence","the","feature","visualization","properties",".","Attributes","--","--","--","--","--","cluster_centers_",":","array","of","shape","(","n_clusters",",","n_features",")","The","computed","cluster","centers","from","the","underlying","model",".","embedded_centers_",":","array","of","shape","(","n_clusters",",","2",")","The","positions","of","all","the","cluster","centers","on","the","graph",".","scores_",":","array","of","shape","(","n_clusters",",",")","The","scores","of","each","cluster","that","determine","its","size","on","the","graph",".","fit_time_",":","Timer","The","time","it","took","to","fit","the","clustering","model","and","perform","the","embedding",".","Notes","--","--","-","Currently","the","only","two","embeddings","supported","are","MDS","and","TSNE",".","Soon","to","follow","will","be","PCoA","and","a","customized","version","of","PCoA","for","LDA",".","The","only","supported","scoring","metric","is","membership",",","but","in","the","future",",","silhouette","scores","and","cluster","diameter","will","be","added",".","In","terms","of","algorithm","support",",","right","now","any","clustering","algorithm","that","has","a","learned","``","cluster_centers_","``","and","``","labels_","``","attribute","will","work","with","the","visualizer",".","In","the","future",",","we","will","update","this","to","work","with","hierarchical","clusterers","that","have","``","n_components","``","and","LDA","."]
docstr: Fit the clustering model, computing the centers then embeds the centers
  into 2D space using the embedding method specified.
docstr_tok: ["Fit","the","clustering","model",",","computing","the","centers","then","embeds","the","centers","into","2D","space","using","the","embedding","method","specified","."]
code: def fit(self, X, y=None):
      """
      Fit the clustering model, computing the centers then embeds the centers
      into 2D space using the embedding method specified.
      """
      with Timer() as self.fit_time_:
          if not check_fitted(
              self.estimator, is_fitted_by=self.is_fitted
          ):
              # Fit the underlying estimator
              self.estimator.fit(X, y)
  
      # Get the centers
      # TODO: is this how sklearn stores all centers in the model?
      C = self.cluster_centers_
  
      # Embed the centers in 2D space and get the cluster scores
      self.embedded_centers_ = self.transformer.fit_transform(C)
      self.scores_ = self._score_clusters(X, y)
  
      # Draw the clusters and fit returns self
      self.draw()
      return self
  
imports: import numpy
  import matplotlib.pyplot
  from matplotlib.patches import Circle
  from sklearn.manifold import MDS, TSNE
  from yellowbrick.utils.timer import Timer
  from yellowbrick.utils.decorators import memoized
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.cluster.base import ClusteringScoreVisualizer
  from yellowbrick.utils.helpers import prop_to_size, check_fitted
label_desc: Use image node_id 5 for calling the InterclusterDistance obj's underlying member method code with example usage: obj.fit(X, y) and returns: self