class_docstr: TargetEncoder
docstr: :param model_id: Destination id for this model; auto-generated if not specified.
         Defaults to ``None``.
  :type model_id: Union[None, str, H2OEstimator], optional
  :param training_frame: Id of the training data frame.
         Defaults to ``None``.
  :type training_frame: Union[None, str, H2OFrame], optional
  :param fold_column: Column with cross-validation fold index assignment per observation.
         Defaults to ``None``.
  :type fold_column: str, optional
  :param response_column: Response variable column.
         Defaults to ``None``.
  :type response_column: str, optional
  :param ignored_columns: Names of columns to ignore for training.
         Defaults to ``None``.
  :type ignored_columns: List[str], optional
  :param columns_to_encode: List of categorical columns or groups of categorical columns to encode. When groups of
         columns are specified, each group is encoded as a single column (interactions are created internally).
         Defaults to ``None``.
  :type columns_to_encode: List[List[str]], optional
  :param keep_original_categorical_columns: If true, the original non-encoded categorical features will remain in
         the result frame.
         Defaults to ``True``.
  :type keep_original_categorical_columns: bool
  :param blending: If true, enables blending of posterior probabilities (computed for a given categorical value)
         with prior probabilities (computed on the entire set). This allows to mitigate the effect of categorical
         values with small cardinality. The blending effect can be tuned using the `inflection_point` and
         `smoothing` parameters.
         Defaults to ``False``.
  :type blending: bool
  :param inflection_point: Inflection point of the sigmoid used to blend probabilities (see `blending` parameter).
         For a given categorical value, if it appears less that `inflection_point` in a data sample, then the
         influence of the posterior probability will be smaller than the prior.
         Defaults to ``10.0``.
  :type inflection_point: float
  :param smoothing: Smoothing factor corresponds to the inverse of the slope at the inflection point on the
         sigmoid used to blend probabilities (see `blending` parameter). If smoothing tends towards 0, then the
         sigmoid used for blending turns into a Heaviside step function.
         Defaults to ``20.0``.
  :type smoothing: float
  :param data_leakage_handling: Data leakage handling strategy used to generate the encoding. Supported options
         are:
         1) "none" (default) - no holdout, using the entire training frame.
         2) "leave_one_out" - current row's response value is subtracted from the per-level frequencies pre-
         calculated on the entire training frame.
         3) "k_fold" - encodings for a fold are generated based on out-of-fold data.
  
         Defaults to ``"none"``.
  :type data_leakage_handling: Literal["leave_one_out", "k_fold", "none"]
  :param noise: The amount of noise to add to the encoded column. Use 0 to disable noise, and -1 (=AUTO) to let
         the algorithm determine a reasonable amount of noise.
         Defaults to ``0.01``.
  :type noise: float
  :param seed: Seed used to generate the noise. By default, the seed is chosen randomly.
         Defaults to ``-1``.
  :type seed: int
docstr_tok: [":","param","model_id",":","Destination","id","for","this","model",";","auto-generated","if","not","specified",".","Defaults","to","``","None","``",".",":","type","model_id",":","Union","[","None",",","str",",","H2OEstimator","]",",","optional",":","param","training_frame",":","Id","of","the","training","data","frame",".","Defaults","to","``","None","``",".",":","type","training_frame",":","Union","[","None",",","str",",","H2OFrame","]",",","optional",":","param","fold_column",":","Column","with","cross-validation","fold","index","assignment","per","observation",".","Defaults","to","``","None","``",".",":","type","fold_column",":","str",",","optional",":","param","response_column",":","Response","variable","column",".","Defaults","to","``","None","``",".",":","type","response_column",":","str",",","optional",":","param","ignored_columns",":","Names","of","columns","to","ignore","for","training",".","Defaults","to","``","None","``",".",":","type","ignored_columns",":","List","[","str","]",",","optional",":","param","columns_to_encode",":","List","of","categorical","columns","or","groups","of","categorical","columns","to","encode",".","When","groups","of","columns","are","specified",",","each","group","is","encoded","as","a","single","column","(","interactions","are","created","internally",")",".","Defaults","to","``","None","``",".",":","type","columns_to_encode",":","List","[","List","[","str","]","]",",","optional",":","param","keep_original_categorical_columns",":","If","true",",","the","original","non-encoded","categorical","features","will","remain","in","the","result","frame",".","Defaults","to","``","True","``",".",":","type","keep_original_categorical_columns",":","bool",":","param","blending",":","If","true",",","enables","blending","of","posterior","probabilities","(","computed","for","a","given","categorical","value",")","with","prior","probabilities","(","computed","on","the","entire","set",")",".","This","allows","to","mitigate","the","effect","of","categorical","values","with","small","cardinality",".","The","blending","effect","can","be","tuned","using","the","`","inflection_point","`","and","`","smoothing","`","parameters",".","Defaults","to","``","False","``",".",":","type","blending",":","bool",":","param","inflection_point",":","Inflection","point","of","the","sigmoid","used","to","blend","probabilities","(","see","`","blending","`","parameter",")",".","For","a","given","categorical","value",",","if","it","appears","less","that","`","inflection_point","`","in","a","data","sample",",","then","the","influence","of","the","posterior","probability","will","be","smaller","than","the","prior",".","Defaults","to","``","10.0","``",".",":","type","inflection_point",":","float",":","param","smoothing",":","Smoothing","factor","corresponds","to","the","inverse","of","the","slope","at","the","inflection","point","on","the","sigmoid","used","to","blend","probabilities","(","see","`","blending","`","parameter",")",".","If","smoothing","tends","towards","0",",","then","the","sigmoid","used","for","blending","turns","into","a","Heaviside","step","function",".","Defaults","to","``","20.0","``",".",":","type","smoothing",":","float",":","param","data_leakage_handling",":","Data","leakage","handling","strategy","used","to","generate","the","encoding",".","Supported","options","are",":","1",")","``","none","''","(","default",")","-","no","holdout",",","using","the","entire","training","frame",".","2",")","``","leave_one_out","''","-","current","row","'s","response","value","is","subtracted","from","the","per-level","frequencies","pre-","calculated","on","the","entire","training","frame",".","3",")","``","k_fold","''","-","encodings","for","a","fold","are","generated","based","on","out-of-fold","data",".","Defaults","to","``","``","none","''","``",".",":","type","data_leakage_handling",":","Literal","[","``","leave_one_out","''",",","``","k_fold","''",",","``","none","''","]",":","param","noise",":","The","amount","of","noise","to","add","to","the","encoded","column",".","Use","0","to","disable","noise",",","and","-1","(","=AUTO",")","to","let","the","algorithm","determine","a","reasonable","amount","of","noise",".","Defaults","to","``","0.01","``",".",":","type","noise",":","float",":","param","seed",":","Seed","used","to","generate","the","noise",".","By","default",",","the","seed","is","chosen","randomly",".","Defaults","to","``","-1","``",".",":","type","seed",":","int"]
code: def __init__(
      self,
      model_id=None,  # type: Optional[Union[None, str, H2OEstimator]]
      training_frame=None,  # type: Optional[Union[None, str, H2OFrame]]
      fold_column=None,  # type: Optional[str]
      response_column=None,  # type: Optional[str]
      ignored_columns=None,  # type: Optional[List[str]]
      columns_to_encode=None,  # type: Optional[List[List[str]]]
      keep_original_categorical_columns=True,  # type: bool
      blending=False,  # type: bool
      inflection_point=10.0,  # type: float
      smoothing=20.0,  # type: float
      data_leakage_handling="none",  # type: Literal["leave_one_out", "k_fold", "none"]
      noise=0.01,  # type: float
      seed=-1,  # type: int
  ):
      """
      :param model_id: Destination id for this model; auto-generated if not specified.
             Defaults to ``None``.
      :type model_id: Union[None, str, H2OEstimator], optional
      :param training_frame: Id of the training data frame.
             Defaults to ``None``.
      :type training_frame: Union[None, str, H2OFrame], optional
      :param fold_column: Column with cross-validation fold index assignment per observation.
             Defaults to ``None``.
      :type fold_column: str, optional
      :param response_column: Response variable column.
             Defaults to ``None``.
      :type response_column: str, optional
      :param ignored_columns: Names of columns to ignore for training.
             Defaults to ``None``.
      :type ignored_columns: List[str], optional
      :param columns_to_encode: List of categorical columns or groups of categorical columns to encode. When groups of
             columns are specified, each group is encoded as a single column (interactions are created internally).
             Defaults to ``None``.
      :type columns_to_encode: List[List[str]], optional
      :param keep_original_categorical_columns: If true, the original non-encoded categorical features will remain in
             the result frame.
             Defaults to ``True``.
      :type keep_original_categorical_columns: bool
      :param blending: If true, enables blending of posterior probabilities (computed for a given categorical value)
             with prior probabilities (computed on the entire set). This allows to mitigate the effect of categorical
             values with small cardinality. The blending effect can be tuned using the `inflection_point` and
             `smoothing` parameters.
             Defaults to ``False``.
      :type blending: bool
      :param inflection_point: Inflection point of the sigmoid used to blend probabilities (see `blending` parameter).
             For a given categorical value, if it appears less that `inflection_point` in a data sample, then the
             influence of the posterior probability will be smaller than the prior.
             Defaults to ``10.0``.
      :type inflection_point: float
      :param smoothing: Smoothing factor corresponds to the inverse of the slope at the inflection point on the
             sigmoid used to blend probabilities (see `blending` parameter). If smoothing tends towards 0, then the
             sigmoid used for blending turns into a Heaviside step function.
             Defaults to ``20.0``.
      :type smoothing: float
      :param data_leakage_handling: Data leakage handling strategy used to generate the encoding. Supported options
             are:
             1) "none" (default) - no holdout, using the entire training frame.
             2) "leave_one_out" - current row's response value is subtracted from the per-level frequencies pre-
             calculated on the entire training frame.
             3) "k_fold" - encodings for a fold are generated based on out-of-fold data.
  
             Defaults to ``"none"``.
      :type data_leakage_handling: Literal["leave_one_out", "k_fold", "none"]
      :param noise: The amount of noise to add to the encoded column. Use 0 to disable noise, and -1 (=AUTO) to let
             the algorithm determine a reasonable amount of noise.
             Defaults to ``0.01``.
      :type noise: float
      :param seed: Seed used to generate the noise. By default, the seed is chosen randomly.
             Defaults to ``-1``.
      :type seed: int
      """
      super(H2OTargetEncoderEstimator, self).__init__()
      self._parms = {}
      self._id = self._parms["model_id"] = model_id
      self.training_frame = training_frame
      self.fold_column = fold_column
      self.response_column = response_column
      self.ignored_columns = ignored_columns
      self.columns_to_encode = columns_to_encode
      self.keep_original_categorical_columns = (
          keep_original_categorical_columns
      )
      self.blending = blending
      self.inflection_point = inflection_point
      self.smoothing = smoothing
      self.data_leakage_handling = data_leakage_handling
      self.noise = noise
      self.seed = seed
  
imports: from h2o.utils.metaclass import deprecated_params, deprecated_property
  import h2o
  import warnings
  from h2o.exceptions import H2ODeprecationWarning
  from h2o.utils.typechecks import U
  from h2o.estimators.estimator_base import H2OEstimator
  from h2o.exceptions import H2OValueError
  from h2o.frame import H2OFrame
  from h2o.utils.typechecks import assert_is_type, Enum, numeric
label_desc: Use image node_id 1 to create a new H2OTargetEncoderEstimator object from inherited base classes: H2OEstimator with example: obj = H2OTargetEncoderEstimator(model_id, training_frame, fold_column, response_column, ignored_columns, columns_to_encode, keep_original_categorical_columns, blending, inflection_point, smoothing, data_leakage_handling, noise, seed)