class_docstr: Visualizes explanation as a partial dependence plot.
class_docstr_tok: ["Visualizes","explanation","as","a","partial","dependence","plot","."]
docstr: Provides interactive visualizations.
  
  Args:
      key: Either a scalar or list
          that indexes the internal object for sub-plotting.
          If an overall visualization is requested, pass None.
  
  Returns:
      A Plotly figure.
docstr_tok: ["Provides","interactive","visualizations",".","Args",":","key",":","Either","a","scalar","or","list","that","indexes","the","internal","object","for","sub-plotting",".","If","an","overall","visualization","is","requested",",","pass","None",".","Returns",":","A","Plotly","figure","."]
code: def visualize(self, key=None):
      """Provides interactive visualizations.
  
      Args:
          key: Either a scalar or list
              that indexes the internal object for sub-plotting.
              If an overall visualization is requested, pass None.
  
      Returns:
          A Plotly figure.
      """
      from ..visual.plot import plot_line, plot_bar
  
      data_dict = self.data(key)
      if data_dict is None:
          return None
  
      feature_type = self.feature_types[key]
      feature_name = self.feature_names[key]
      if feature_type == "continuous":
          figure = plot_line(data_dict, title=feature_name)
      elif feature_type == "nominal" or feature_type == "ordinal":
          figure = plot_bar(data_dict, title=feature_name)
      else:
          raise Exception(
              "Feature type {0} is not supported.".format(feature_type)
          )
  
      figure["layout"]["yaxis1"].update(title="Average Response")
      return figure
  
file_path: interpret/python/interpret-core/interpret/blackbox/_partialdependence.py
imports: from ..api.base import ExplainerMixin, ExplanationMixin
  import numpy
  from ..utils._explanation import gen_name_from_class, gen_global_selector
  from ..utils._clean_x import preclean_X
  from ..utils._unify_predict import determine_classes, unify_predict_fn
  from ..utils._unify_data import unify_data
label_desc: Use image node_id 3 for calling the PDPExplanation obj's underlying member method code with example usage: obj.visualize(key) and returns: figure, None