class_docstr: Summarize given model performance on the train and test datasets based on selected scorers.
  
  Parameters
  ----------
  scorers: Union[Mapping[str, Union[str, Callable]], List[str]], default: None
      Scorers to override the default scorers, find more about the supported formats at
      https://docs.deepchecks.com/stable/user-guide/general/metrics_guide.html
  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.
  
  Notes
  -----
  Scorers are a convention of sklearn to evaluate a model.
  `See scorers documentation <https://scikit-learn.org/stable/modules/model_evaluation.html#scoring>`__
  A scorer is a function which accepts (model, X, y_true) and returns a float result which is the score.
  For every scorer higher scores are better than lower scores.
  
  You can create a scorer out of existing sklearn metrics:
  
  .. code-block:: python
  
      from sklearn.metrics import roc_auc_score, make_scorer
  
      training_labels = [1, 2, 3]
      auc_scorer = make_scorer(roc_auc_score, labels=training_labels, multi_class='ovr')
      # Note that the labels parameter is required for multi-class classification in metrics like roc_auc_score or
      # log_loss that use the predict_proba function of the model, in case that not all labels are present in the test
      # set.
  
  Or you can implement your own:
  
  .. code-block:: python
  
      from sklearn.metrics import make_scorer
  
  
      def my_mse(y_true, y_pred):
          return (y_true - y_pred) ** 2
  
  
      # Mark greater_is_better=False, since scorers always suppose to return
      # value to maximize.
      my_mse_scorer = make_scorer(my_mse, greater_is_better=False)
code: def __init__(
      self,
      scorers: Union[
          Mapping[str, Union[str, Callable]], List[str]
      ] = None,
      n_samples: int = 1_000_000,
      random_state: int = 42,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.scorers = scorers
      self.n_samples = n_samples
      self.random_state = random_state
  
file_path: deepchecks/deepchecks/tabular/checks/model_evaluation/train_test_performance.py
imports: from numbers import Number
  from typing import Callable, List, Mapping, TypeVar, Union, cast
  import pandas
  from deepchecks.core import CheckResult
  from deepchecks.core.checks import CheckConfig
  from deepchecks.tabular import Context, TrainTestCheck
  from deepchecks.utils.abstracts.train_test_performace import TrainTestPerformanceAbstract
  from deepchecks.utils.docref import doclink
label_desc: Use image node_id 1 to create a new TrainTestPerformance object from inherited base classes: TrainTestPerformanceAbstract, TrainTestCheck with example: obj = TrainTestPerformance(scorers, n_samples, random_state)