class_docstr: A meta-estimator which wraps a given estimator with a post-processing
  step.
  
  The post-processor trains on a separate training set from the estimator to
  prevent leakage.
  
  Note:
      Because of the dataset splitting, if a Pipeline is necessary it should
      be used as the input to this meta-estimator not the other way around.
  
  Attributes:
      estimator_: Fitted estimator.
      postprocessor_: Fitted postprocessor.
      classes_ (array, shape (n_classes,)): Class labels from `estimator_`.
class_docstr_tok: ["A","meta-estimator","which","wraps","a","given","estimator","with","a","post-processing","step",".","The","post-processor","trains","on","a","separate","training","set","from","the","estimator","to","prevent","leakage",".","Note",":","Because","of","the","dataset","splitting",",","if","a","Pipeline","is","necessary","it","should","be","used","as","the","input","to","this","meta-estimator","not","the","other","way","around",".","Attributes",":","estimator_",":","Fitted","estimator",".","postprocessor_",":","Fitted","postprocessor",".","classes_","(","array",",","shape","(","n_classes",",",")",")",":","Class","labels","from","`","estimator_","`","."]
docstr: Args:
      estimator (sklearn.BaseEstimator): Original estimator.
      postprocessor: Post-processing algorithm.
      prefit (bool): If ``True``, it is assumed that estimator has been
          fitted already and all data is used to train postprocessor.
      val_size (int or float): Size of validation set used to fit the
          postprocessor. The estimator fits on the remainder of the
          training set.
          See :func:`~sklearn.model_selection.train_test_split` for
          details.
      **options: Keyword options passed through to
          :func:`~sklearn.model_selection.train_test_split`.
          Note: 'train_size' and 'test_size' will be ignored in favor of
          'val_size'.
docstr_tok: ["Args",":","estimator","(","sklearn.BaseEstimator",")",":","Original","estimator",".","postprocessor",":","Post-processing","algorithm",".","prefit","(","bool",")",":","If","``","True","``",",","it","is","assumed","that","estimator","has","been","fitted","already","and","all","data","is","used","to","train","postprocessor",".","val_size","(","int","or","float",")",":","Size","of","validation","set","used","to","fit","the","postprocessor",".","The","estimator","fits","on","the","remainder","of","the","training","set",".","See",":","func",":","`","~sklearn.model_selection.train_test_split","`","for","details",".","*","*","options",":","Keyword","options","passed","through","to",":","func",":","`","~sklearn.model_selection.train_test_split","`",".","Note",":","'train_size","'","and","'test_size","'","will","be","ignored","in","favor","of","'val_size","'","."]
code: def __init__(
      self,
      estimator,
      postprocessor,
      *,
      prefit=False,
      val_size=0.25,
      **options,
  ):
      """
      Args:
          estimator (sklearn.BaseEstimator): Original estimator.
          postprocessor: Post-processing algorithm.
          prefit (bool): If ``True``, it is assumed that estimator has been
              fitted already and all data is used to train postprocessor.
          val_size (int or float): Size of validation set used to fit the
              postprocessor. The estimator fits on the remainder of the
              training set.
              See :func:`~sklearn.model_selection.train_test_split` for
              details.
          **options: Keyword options passed through to
              :func:`~sklearn.model_selection.train_test_split`.
              Note: 'train_size' and 'test_size' will be ignored in favor of
              'val_size'.
      """
      self.estimator = estimator
      self.postprocessor = postprocessor
      self.prefit = prefit
      self.val_size = val_size
      self.options = options
  
file_path: AIF360/aif360/sklearn/postprocessing/__init__.py
imports: from logging import warning
  import pandas
  from sklearn.base import BaseEstimator, MetaEstimatorMixin, clone
  from sklearn.model_selection import train_test_split
  from sklearn.utils.metaestimators import if_delegate_has_method
  from aif360.sklearn.postprocessing.calibrated_equalized_odds import CalibratedEqualizedOdds
  from aif360.sklearn.postprocessing.reject_option_classification import RejectOptionClassifier, RejectOptionClassifierCV
label_desc: Use image node_id 1 to create a new PostProcessingMeta object from inherited base classes: BaseEstimator, MetaEstimatorMixin with example: obj = PostProcessingMeta(estimator, postprocessor)