class_docstr: Implements the proposed method from
  
  "CatBoost: gradient boosting with categorical features support", Dorogush et al. (2018).
  
  The Catboost encoder is a target encoder for categorical features. In this implementation we follow Eq. (1)
  in https://arxiv.org/pdf/1810.11363.pdf.
docstr: See Eq. (1) in https://arxiv.org/pdf/1810.11363.pdf
  
  :param p: The p parameter in the equation. This weights the impact of the given alpha.
  :param alpha: Alpha parameter in the equation. If None is given, the global mean is used as suggested in
                "A preprocessing scheme for high-cardinality categorical attributes in classification and
                prediction problems", Micci-Barreca (2001)
docstr_tok: ["See","Eq",".","(","1",")","in","https",":","\/\/arxiv.org\/pdf\/1810.11363.pdf",":","param","p",":","The","p","parameter","in","the","equation",".","This","weights","the","impact","of","the","given","alpha",".",":","param","alpha",":","Alpha","parameter","in","the","equation",".","If","None","is","given",",","the","global","mean","is","used","as","suggested","in","``","A","preprocessing","scheme","for","high-cardinality","categorical","attributes","in","classification","and","prediction","problems","''",",","Micci-Barreca","(","2001",")"]
code: def __init__(self, p: float = 1, alpha: Optional[float] = None):
      """See Eq. (1) in https://arxiv.org/pdf/1810.11363.pdf
  
      :param p: The p parameter in the equation. This weights the impact of the given alpha.
      :param alpha: Alpha parameter in the equation. If None is given, the global mean is used as suggested in
                    "A preprocessing scheme for high-cardinality categorical attributes in classification and
                    prediction problems", Micci-Barreca (2001)
      """
      self._p = p
      self._org_alpha = alpha
      self._category_means = None
  
file_path: dowhy/dowhy/gcm/util/catboost_encoder.py
imports: from typing import Optional
  import numpy
  from sklearn.preprocessing import LabelEncoder
label_desc: Use image node_id 1 to create a new CatBoostEncoder object  with example: obj = CatBoostEncoder(p, alpha)