class_docstr: Leave one out coding for categorical features.
  
  This is very similar to target encoding but excludes the current row's
  target when calculating the mean target for a level to reduce the effect
  of outliers.
  
  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.
      The optimal value is commonly between 0.05 and 0.6. The default is to not add noise, but that leads
      to significantly suboptimal results.
  
  
  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 = LeaveOneOutEncoder(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] Originally by Owen Zhang (reference broken), another short explanation at:
  https://datascience.stackexchange.com/questions/10839/what-is-difference-between-one-hot-encoding-and-leave-one-out-encoding
code: def __init__(
      self,
      verbose=0,
      cols=None,
      drop_invariant=False,
      return_df=True,
      handle_unknown="value",
      handle_missing="value",
      random_state=None,
      sigma=None,
  ):
      super().__init__(
          verbose=verbose,
          cols=cols,
          drop_invariant=drop_invariant,
          return_df=return_df,
          handle_unknown=handle_unknown,
          handle_missing=handle_missing,
      )
      self.mapping = None
      self._mean = None
      self.random_state = random_state
      self.sigma = sigma
  
file_path: category_encoders/category_encoders/leave_one_out.py
imports: import numpy
  import pandas
  import category_encoders.utils
  from sklearn.utils.random import check_random_state
label_desc: Use image node_id 1 to create a new LeaveOneOutEncoder object from inherited base classes: util, util with example: obj = LeaveOneOutEncoder(verbose, cols, drop_invariant, return_df, handle_unknown, handle_missing, random_state, sigma)