class_docstr: Produces explanation specific to regression metrics.
class_docstr_tok: ["Produces","explanation","specific","to","regression","metrics","."]
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_density
  
      data_dict = self.data(key)
      if data_dict is None:
          return None
  
      rmse = data_dict["rmse"]
      r2 = data_dict["r2"]
  
      title = "{0} <br> RMSE = {1:.2f}" + " | R<sup>2</sup> = {2:.2f}"
      title = title.format(self.name, rmse, r2)
      density_fig = plot_density(
          data_dict["density"],
          title=title,
          xtitle="Residuals",
          ytitle="Density",
      )
      return density_fig
  
file_path: interpret/python/interpret-core/interpret/perf/_regression.py
imports: from ..api.base import ExplainerMixin, ExplanationMixin
  from ..utils._explanation import gen_name_from_class
  from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score
  import numpy
  from ..utils._clean_x import preclean_X
  from ..utils._clean_simple import clean_dimensions
  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 RegressionExplanation obj's underlying member method code with example usage: obj.visualize(key) and returns: density_fig, None