class_docstr: Render feature importance for the model.
  
  This visualization depends on :py:class:`~autogluon.eda.analysis.model.AutoGluonModelEvaluator` analysis.
  
  Parameters
  ----------
  show_barplots: bool, default = False
      render features barplots if True
  headers: bool, default = False
      if `True` then render headers
  namespace: str, default = None
      namespace to use; can be nested like `ns_a.ns_b.ns_c`
  fig_args: Optional[Dict[str, Any]] = None,
      kwargs to pass into chart figure
  
  Examples
  --------
  >>> import autogluon.eda.analysis as eda
  >>> import autogluon.eda.visualization as viz
  >>> import autogluon.eda.auto as auto
  >>>
  >>> df_train = ...
  >>> df_test = ...
  >>> predictor = ...
  >>>
  >>> auto.analyze(model=predictor, val_data=df_test, anlz_facets=[
  >>>     eda.model.AutoGluonModelEvaluator(),
  >>> ], viz_facets=[
  >>>     viz.model.FeatureImportance(show_barplots=True)
  >>> ])
  
  See Also
  --------
  :py:class:`~autogluon.eda.analysis.model.AutoGluonModelEvaluator`
class_docstr_tok: ["Render","feature","importance","for","the","model",".","This","visualization","depends","on",":","py",":","class",":","`","~autogluon.eda.analysis.model.AutoGluonModelEvaluator","`","analysis",".","Parameters","--","--","--","--","--","show_barplots",":","bool",",","default","=","False","render","features","barplots","if","True","headers",":","bool",",","default","=","False","if","`","True","`","then","render","headers","namespace",":","str",",","default","=","None","namespace","to","use",";","can","be","nested","like","`","ns_a.ns_b.ns_c","`","fig_args",":","Optional","[","Dict","[","str",",","Any","]","]","=","None",",","kwargs","to","pass","into","chart","figure","Examples","--","--","--","--",">",">",">","import","autogluon.eda.analysis","as","eda",">",">",">","import","autogluon.eda.visualization","as","viz",">",">",">","import","autogluon.eda.auto","as","auto",">",">",">",">",">",">","df_train","=","...",">",">",">","df_test","=","...",">",">",">","predictor","=","...",">",">",">",">",">",">","auto.analyze","(","model=predictor",",","val_data=df_test",",","anlz_facets=","[",">",">",">","eda.model.AutoGluonModelEvaluator","(",")",",",">",">",">","]",",","viz_facets=","[",">",">",">","viz.model.FeatureImportance","(","show_barplots=True",")",">",">",">","]",")","See","Also","--","--","--","--",":","py",":","class",":","`","~autogluon.eda.analysis.model.AutoGluonModelEvaluator","`"]
code: def _render(self, state: AnalysisState) -> None:
      self.render_header_if_needed(state, "Feature Importance")
      importance = state.model_evaluation.importance
      with pd.option_context(
          "display.max_rows", 100 if len(importance) <= 100 else 20
      ):
          self.display_obj(importance)
      if self.show_barplots:
          fig_args = self.fig_args.copy()
          if "figsize" not in fig_args:
              fig_args["figsize"] = (12, len(importance) / 4)
  
          fig, ax = plt.subplots(**fig_args)
          sns.barplot(
              ax=ax,
              data=importance.reset_index(),
              y="index",
              x="importance",
              **self._kwargs,
          )
          plt.show(fig)
  
imports: from typing import Any, Dict, Optional
  import matplotlib.pyplot
  import pandas
  import seaborn
  from yellowbrick.contrib.wrapper import REGRESSOR, ContribEstimator
  from yellowbrick.regressor import residuals_plot
  from autogluon.core.constants import REGRESSION
  from ..state import AnalysisState
  from .base import AbstractVisualization
  from .jupyter import JupyterMixin
label_desc: Use image node_id 3 for calling the FeatureImportance obj's underlying member method code with example usage: obj._render(state) without return types