class_docstr: Display performance score segmented by 2 top (or given) features in a heatmap.
  
  .. deprecated:: 0.8.1
      The SegmentPerformance check is deprecated and will be removed in the 0.11 version. Please use the
      WeakSegmentsPerformance check instead.
  
  Parameters
  ----------
  feature_1 : Optional[Hashable] , default: None
      feature to segment by on y-axis.
  feature_2 : Optional[Hashable] , default: None
      feature to segment by on x-axis.
  alternative_scorer : Tuple[str, Union[str, Callable]] , default: None
      Score to show, either function or sklearn scorer name.
      If is not given a default scorer (per the model type) will be used.
  max_segments : int , default: 10
      maximal number of segments to split the values into.
  n_samples : int , default: 1_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
docstr: Return check instance config.
docstr_tok: ["Return","check","instance","config","."]
code: def config(
      self, include_version: bool = True, include_defaults: bool = True
  ) -> "CheckConfig":
      """Return check instance config."""
      if self.alternative_scorer is not None:
          for k, v in self.alternative_scorer.items():
              if not isinstance(v, str):
                  reference = doclink(
                      "supported-metrics-by-string",
                      template="For a list of built-in scorers please refer to {link}. ",
                  )
                  raise ValueError(
                      "Only built-in scorers are allowed when serializing check instances. "
                      f"{reference}Scorer name: {k}"
                  )
      return super().config(
          include_version, include_defaults=include_defaults
      )
  
file_path: deepchecks/deepchecks/tabular/checks/model_evaluation/segment_performance.py
imports: import warnings
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union, cast
  import numpy
  import plotly.express
  from deepchecks.core import CheckResult
  from deepchecks.core.errors import DatasetValidationError, DeepchecksValueError
  from deepchecks.tabular import Context, SingleDatasetCheck
  from deepchecks.utils.docref import doclink
  from deepchecks.utils.performance.partition import partition_column
  from deepchecks.utils.strings import format_number
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 3 for calling the SegmentPerformance obj's underlying member method code with example usage: obj.config(include_version, include_defaults) and returns: super