class_docstr: 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
  ----------
  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``
  
  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.
  
  color: string
      Specify color for barchart
  
  kwargs : dict
      Keyword arguments that are passed to the base class and may influence
      the visualization as defined in other Visualizers.
  
  Attributes
  ----------
  features_ : np.array
      The feature labels
  
  scores_ : np.array
      Correlation between features and dependent variable.
  
  Examples
  --------
  
  >>> viz = FeatureCorrelation()
  >>> viz.fit(X, y)
  >>> viz.show()
code: def __init__(
      self,
      ax=None,
      method="pearson",
      labels=None,
      sort=False,
      feature_index=None,
      feature_names=None,
      color=None,
      **kwargs,
  ):
      super(FeatureCorrelation, self).__init__(ax, **kwargs)
  
      self.correlation_labels = CORRELATION_LABELS
      self.correlation_methods = CORRELATION_METHODS
  
      if method not in self.correlation_labels:
          raise YellowbrickValueError(
              "Method {} not implement; choose from {}".format(
                  method, ", ".join(self.correlation_labels)
              )
          )
  
      # Parameters
      self.sort = sort
      self.color = color
      self.method = method
      self.labels = labels
      self.feature_index = feature_index
      self.feature_names = feature_names
  
file_path: yellowbrick/yellowbrick/target/feature_correlation.py
imports: import numpy
  from yellowbrick.utils import is_dataframe
  from yellowbrick.target.base import TargetVisualizer
  from yellowbrick.exceptions import YellowbrickValueError, YellowbrickWarning
  from sklearn.feature_selection import mutual_info_classif
  from sklearn.feature_selection import mutual_info_regression
  from scipy.stats import pearsonr
label_desc: Use image node_id 1 to create a new FeatureCorrelation object from inherited base classes: TargetVisualizer with example: obj = FeatureCorrelation(ax, method, labels, sort, feature_index, feature_names, color)