class_docstr: The optional return value of decision_plot.
  
  The class attributes can be used to apply the same scale and feature ordering to other decision plots.
class_docstr_tok: ["The","optional","return","value","of","decision_plot",".","The","class","attributes","can","be","used","to","apply","the","same","scale","and","feature","ordering","to","other","decision","plots","."]
docstr: Example
  -------
  Plot two decision plots using the same feature order and x-axis.
  >>> range1, range2 = range(20), range(20, 40)
  >>> r = decision_plot(base, shap_values[range1], features[range1], return_objects=True)
  >>> decision_plot(base, shap_values[range2], features[range2], feature_order=r.feature_idx, xlim=r.xlim)
  
  Parameters
  ----------
  base_value : float
      The base value used in the plot. For multioutput models,
      this will be the mean of the base values. This will inherit `new_base_value` if specified.
  
  shap_values : numpy.ndarray
      The `shap_values` passed to decision_plot re-ordered based on `feature_order`. If SHAP interaction values
      are passed to decision_plot, `shap_values` is a 2D (matrix) representation of the interactions. See
      `feature_names` to locate the feature positions. If `new_base_value` is specified, the SHAP values are
      relative to the new base value.
  
  feature_names : list of str
      The feature names used in the plot in the order specified in the decision_plot parameter `feature_order`.
  
  feature_idx : numpy.ndarray
      The index used to order `shap_values` based on `feature_order`. This attribute can be used to specify
      identical feature ordering in multiple decision plots.
  
  xlim : tuple[float, float]
      The x-axis limits. This attributed can be used to specify the same x-axis in multiple decision plots.
docstr_tok: ["Example","--","--","--","-","Plot","two","decision","plots","using","the","same","feature","order","and","x-axis",".",">",">",">","range1",",","range2","=","range","(","20",")",",","range","(","20",",","40",")",">",">",">","r","=","decision_plot","(","base",",","shap_values","[","range1","]",",","features","[","range1","]",",","return_objects=True",")",">",">",">","decision_plot","(","base",",","shap_values","[","range2","]",",","features","[","range2","]",",","feature_order=r.feature_idx",",","xlim=r.xlim",")","Parameters","--","--","--","--","--","base_value",":","float","The","base","value","used","in","the","plot",".","For","multioutput","models",",","this","will","be","the","mean","of","the","base","values",".","This","will","inherit","`","new_base_value","`","if","specified",".","shap_values",":","numpy.ndarray","The","`","shap_values","`","passed","to","decision_plot","re-ordered","based","on","`","feature_order","`",".","If","SHAP","interaction","values","are","passed","to","decision_plot",",","`","shap_values","`","is","a","2D","(","matrix",")","representation","of","the","interactions",".","See","`","feature_names","`","to","locate","the","feature","positions",".","If","`","new_base_value","`","is","specified",",","the","SHAP","values","are","relative","to","the","new","base","value",".","feature_names",":","list","of","str","The","feature","names","used","in","the","plot","in","the","order","specified","in","the","decision_plot","parameter","`","feature_order","`",".","feature_idx",":","numpy.ndarray","The","index","used","to","order","`","shap_values","`","based","on","`","feature_order","`",".","This","attribute","can","be","used","to","specify","identical","feature","ordering","in","multiple","decision","plots",".","xlim",":","tuple","[","float",",","float","]","The","x-axis","limits",".","This","attributed","can","be","used","to","specify","the","same","x-axis","in","multiple","decision","plots","."]
code: def __init__(
      self, base_value, shap_values, feature_names, feature_idx, xlim
  ):
      """
      Example
      -------
      Plot two decision plots using the same feature order and x-axis.
      >>> range1, range2 = range(20), range(20, 40)
      >>> r = decision_plot(base, shap_values[range1], features[range1], return_objects=True)
      >>> decision_plot(base, shap_values[range2], features[range2], feature_order=r.feature_idx, xlim=r.xlim)
  
      Parameters
      ----------
      base_value : float
          The base value used in the plot. For multioutput models,
          this will be the mean of the base values. This will inherit `new_base_value` if specified.
  
      shap_values : numpy.ndarray
          The `shap_values` passed to decision_plot re-ordered based on `feature_order`. If SHAP interaction values
          are passed to decision_plot, `shap_values` is a 2D (matrix) representation of the interactions. See
          `feature_names` to locate the feature positions. If `new_base_value` is specified, the SHAP values are
          relative to the new base value.
  
      feature_names : list of str
          The feature names used in the plot in the order specified in the decision_plot parameter `feature_order`.
  
      feature_idx : numpy.ndarray
          The index used to order `shap_values` based on `feature_order`. This attribute can be used to specify
          identical feature ordering in multiple decision plots.
  
      xlim : tuple[float, float]
          The x-axis limits. This attributed can be used to specify the same x-axis in multiple decision plots.
  
      """
      self.base_value = base_value
      self.shap_values = shap_values
      self.feature_names = feature_names
      self.feature_idx = feature_idx
      self.xlim = xlim
  
file_path: shap/shap/plots/_decision.py
imports: from typing import Union
  import matplotlib.cm
  import matplotlib.pyplot
  import numpy
  import pandas
  from ..utils import hclust_ordering
  from ..utils._legacy import LogitLink, convert_to_link
  from .None import colors
  from ._labels import labels
label_desc: Use image node_id 1 to create a new DecisionPlotResult object  with example: obj = DecisionPlotResult(base_value, shap_values, feature_names, feature_idx, xlim)