class_docstr: Check if a dataset is imbalanced by looking at the target variable distribution.
  
  Parameters
  ----------
  n_top_labels: int, default: 5
      Number of labels to show in display graph
  ignore_nan: bool, default True
      Whether to ignore NaN values in the target variable when counting
      the number of unique values.
class_docstr_tok: ["Check","if","a","dataset","is","imbalanced","by","looking","at","the","target","variable","distribution",".","Parameters","--","--","--","--","--","n_top_labels",":","int",",","default",":","5","Number","of","labels","to","show","in","display","graph","ignore_nan",":","bool",",","default","True","Whether","to","ignore","NaN","values","in","the","target","variable","when","counting","the","number","of","unique","values","."]
code: def __init__(
      self, n_top_labels: int = 5, ignore_nan: bool = True, **kwargs
  ):
      super().__init__(**kwargs)
      self.n_top_labels = n_top_labels
      self.ignore_nan = ignore_nan
  
file_path: deepchecks/deepchecks/tabular/checks/data_integrity/class_imbalance.py
imports: import typing
  import plotly.express
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.tabular import Context, SingleDatasetCheck
  from deepchecks.utils.strings import format_number
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 1 to create a new ClassImbalance object from inherited base classes: SingleDatasetCheck with example: obj = ClassImbalance(n_top_labels, ignore_nan)