class_docstr: CatBoost Encoding for categorical features.
  
  Supported targets: binomial and continuous. For polynomial target support, see PolynomialWrapper.
  
  CatBoostEncoder is the variation of target encoding. It supports
  time-aware encoding, regularization, and online learning.
  
  This implementation is time-aware (similar to CatBoost's parameter 'has_time=True'),
  so no random permutations are used. It makes this encoder sensitive to
  ordering of the data and suitable for time series problems. If your data
  does not have time dependency, it should still work just fine, assuming
  sorting of the data won't leak any information outside the training scope
  (i.e., no data leakage). When data leakage is a possibility, it is wise to
  eliminate it first (for example, shuffle or resample the data).
  
  NOTE: behavior of the transformer would differ in transform and fit_transform
  methods depending if y values are passed. If no target is passed, then
  encoder will map the last value of the running mean to each category. If y is passed
  then it will map all values of the running mean to each category's occurrences.
  
  Parameters
  ----------
  
  verbose: int
      integer indicating verbosity of the output. 0 for none.
  cols: list
      a list of columns to encode, if None, all string columns will be encoded.
  drop_invariant: bool
      boolean for whether or not to drop columns with 0 variance.
  return_df: bool
      boolean for whether to return a pandas DataFrame from transform (otherwise it will be a numpy array).
  handle_missing: str
      options are 'error', 'return_nan'  and 'value', defaults to 'value', which returns the target mean.
  handle_unknown: str
      options are 'error', 'return_nan' and 'value', defaults to 'value', which returns the target mean.
  sigma: float
      adds normal (Gaussian) distribution noise into training data in order to decrease overfitting (testing data are untouched).
      sigma gives the standard deviation (spread or "width") of the normal distribution.
  a: float
      additive smoothing (it is the same variable as "m" in m-probability estimate). By default set to 1.
  
  Example
  -------
  >>> from category_encoders import *
  >>> import pandas as pd
  >>> from sklearn.datasets import fetch_openml
  >>> bunch = fetch_openml(name="house_prices", as_frame=True)
  >>> display_cols = ["Id", "MSSubClass", "MSZoning", "LotFrontage", "YearBuilt", "Heating", "CentralAir"]
  >>> y = bunch.target
  >>> X = pd.DataFrame(bunch.data, columns=bunch.feature_names)[display_cols]
  >>> enc = CatBoostEncoder(cols=['CentralAir', 'Heating']).fit(X, y)
  >>> numeric_dataset = enc.transform(X)
  >>> print(numeric_dataset.info())
  <class 'pandas.core.frame.DataFrame'>
  RangeIndex: 1460 entries, 0 to 1459
  Data columns (total 7 columns):
   #   Column       Non-Null Count  Dtype  
  ---  ------       --------------  -----  
   0   Id           1460 non-null   float64
   1   MSSubClass   1460 non-null   float64
   2   MSZoning     1460 non-null   object 
   3   LotFrontage  1201 non-null   float64
   4   YearBuilt    1460 non-null   float64
   5   Heating      1460 non-null   float64
   6   CentralAir   1460 non-null   float64
  dtypes: float64(6), object(1)
  memory usage: 80.0+ KB
  None
  
  References
  ----------
  
  .. [1] Transforming categorical features to numerical features, from
  https://tech.yandex.com/catboost/doc/dg/concepts/algorithm-main-stages_cat-to-numberic-docpage/
  
  .. [2] CatBoost: unbiased boosting with categorical features, from
  https://arxiv.org/abs/1706.09516
code: def _fit_column_map(self, series, y):
      category = pd.Categorical(series)
  
      categories = category.categories
      codes = category.codes.copy()
  
      codes[codes == -1] = len(categories)
      categories = np.append(categories, np.nan)
  
      return_map = pd.Series(dict(enumerate(categories)))
  
      result = y.groupby(codes).agg(["sum", "count"])
      return result.rename(return_map)
  
file_path: category_encoders/category_encoders/cat_boost.py
imports: import numpy
  import pandas
  import category_encoders.utils
  from sklearn.utils.random import check_random_state
label_desc: Use image node_id 5 for calling the CatBoostEncoder obj's underlying member method code with example usage: obj._fit_column_map(series, y) and returns: result