nodes: 0, module; 1, function_definition; 2, function_name:feature_correlation; 3, parameters; 4, block; 5, identifier:X; 6, identifier:y; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, dictionary_splat_pattern; 14, expression_statement; 15, comment:# Instantiate the visualizer; 16, expression_statement; 17, comment:# Fit and transform the visualizer (calls draw); 18, expression_statement; 19, expression_statement; 20, comment:# Return the axes object on the visualizer; 21, return_statement; 22, identifier:ax; 23, None; 24, identifier:method; 25, string; 26, identifier:labels; 27, None; 28, identifier:sort; 29, False; 30, identifier:feature_index; 31, None; 32, identifier:feature_names; 33, None; 34, identifier:kwargs; 35, comment:"""
      Displays the correlation between features and dependent variables.
  
      This visualizer can be used side-by-side with
      yellowbrick.features.JointPlotVisualizer that plots a feature
      against the target and shows the distribution of each via a
      histogram on each axis.
  
      Parameters
      ----------
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with m features
  
      y : ndarray or Series of length n
          An array or series of target or class values
  
      ax : matplotlib Axes, default: None
          The axis to plot the figure on. If None is passed in the current axes
          will be used (or generated if required).
  
      method : str, default: 'pearson'
          The method to calculate correlation between features and target.
          Options include:
  
              - 'pearson', which uses ``scipy.stats.pearsonr``
              - 'mutual_info-regression', which uses ``mutual_info-regression``
                from ``sklearn.feature_selection``
              - 'mutual_info-classification', which uses ``mutual_info_classif``
                from ``sklearn.feature_selection``
              'mutual_info-classification'], default: 'pearson'
  
      labels : list, default: None
          A list of feature names to use. If a DataFrame is passed to fit and
          features is None, feature names are selected as the column names.
  
      sort : boolean, default: False
          If false, the features are are not sorted in the plot; otherwise
          features are sorted in ascending order of correlation.
  
      feature_index : list,
          A list of feature index to include in the plot.
  
      feature_names : list of feature names
          A list of feature names to include in the plot.
          Must have labels or the fitted data is a DataFrame with column names.
          If feature_index is provided, feature_names will be ignored.
  
      kwargs : dict
          Keyword arguments that are passed to the base class and may influence
          the visualization as defined in other Visualizers.
  
      Returns
      -------
      ax : matplotlib axes
          Returns the axes that the parallel coordinates were drawn on.
      """; 36, assignment; 37, call; 38, call; 39, attribute; 40, string_content:pearson; 41, identifier:viz; 42, call; 43, attribute; 44, argument_list; 45, attribute; 46, argument_list; 47, identifier:viz; 48, identifier:ax; 49, identifier:FeatureCorrelation; 50, argument_list; 51, identifier:viz; 52, identifier:fit; 53, identifier:X; 54, identifier:y; 55, dictionary_splat; 56, identifier:viz; 57, identifier:finalize; 58, identifier:ax; 59, identifier:method; 60, identifier:labels; 61, identifier:sort; 62, identifier:feature_index; 63, identifier:feature_names; 64, dictionary_splat; 65, identifier:kwargs; 66, identifier:kwargs
code: def feature_correlation(X, y, ax=None, method='pearson',
                          labels=None, sort=False, feature_index=None,
                          feature_names=None, **kwargs):
      """
      Displays the correlation between features and dependent variables.
  
      This visualizer can be used side-by-side with
      yellowbrick.features.JointPlotVisualizer that plots a feature
      against the target and shows the distribution of each via a
      histogram on each axis.
  
      Parameters
      ----------
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with m features
  
      y : ndarray or Series of length n
          An array or series of target or class values
  
      ax : matplotlib Axes, default: None
          The axis to plot the figure on. If None is passed in the current axes
          will be used (or generated if required).
  
      method : str, default: 'pearson'
          The method to calculate correlation between features and target.
          Options include:
  
              - 'pearson', which uses ``scipy.stats.pearsonr``
              - 'mutual_info-regression', which uses ``mutual_info-regression``
                from ``sklearn.feature_selection``
              - 'mutual_info-classification', which uses ``mutual_info_classif``
                from ``sklearn.feature_selection``
              'mutual_info-classification'], default: 'pearson'
  
      labels : list, default: None
          A list of feature names to use. If a DataFrame is passed to fit and
          features is None, feature names are selected as the column names.
  
      sort : boolean, default: False
          If false, the features are are not sorted in the plot; otherwise
          features are sorted in ascending order of correlation.
  
      feature_index : list,
          A list of feature index to include in the plot.
  
      feature_names : list of feature names
          A list of feature names to include in the plot.
          Must have labels or the fitted data is a DataFrame with column names.
          If feature_index is provided, feature_names will be ignored.
  
      kwargs : dict
          Keyword arguments that are passed to the base class and may influence
          the visualization as defined in other Visualizers.
  
      Returns
      -------
      ax : matplotlib axes
          Returns the axes that the parallel coordinates were drawn on.
      """
  
      # Instantiate the visualizer
      viz = FeatureCorrelation(ax, method, labels, sort,
                               feature_index, feature_names, **kwargs)
  
      # Fit and transform the visualizer (calls draw)
      viz.fit(X, y, **kwargs)
      viz.finalize()
  
      # Return the axes object on the visualizer
      return viz.ax