class_docstr: Base class for various contrast encoders
  
  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_unknown: str
      options are 'error', 'return_nan', 'value', and 'indicator'. The default is 'value'. Warning: if indicator is used,
      an extra column will be added in if the transform matrix has unknown categories.  This can cause
      unexpected changes in dimension in some cases.
  handle_missing: str
      options are 'error', 'return_nan', 'value', and 'indicator'. The default is 'value'. Warning: if indicator is used,
      an extra column will be added in if the transform matrix has nan values.  This can cause
      unexpected changes in dimension in some cases.
  
  References
  ----------
  
  .. [1] Contrast Coding Systems for Categorical Variables, from
  https://stats.idre.ucla.edu/r/library/r-library-contrast-coding-systems-for-categorical-variables/
  
  .. [2] Gregory Carey (2003). Coding Categorical Variables, from
  http://ibgwww.colorado.edu/~carey/p5741ndir/Coding_Categorical_Variables.pdf
code: def __init__(
      self,
      verbose=0,
      cols=None,
      mapping=None,
      drop_invariant=False,
      return_df=True,
      handle_unknown="value",
      handle_missing="value",
  ):
      super().__init__(
          verbose=verbose,
          cols=cols,
          drop_invariant=drop_invariant,
          return_df=return_df,
          handle_unknown=handle_unknown,
          handle_missing=handle_missing,
      )
      self.mapping = mapping
      self.ordinal_encoder = None
  
file_path: category_encoders/category_encoders/base_contrast_encoder.py
imports: from abc import abstractmethod
  import pandas
  from patsy.contrasts import ContrastMatrix
  import numpy
  from category_encoders.ordinal import OrdinalEncoder
  import category_encoders.utils
  import warnings
label_desc: Use image node_id 1 to create a new BaseContrastEncoder object from inherited base classes: util, util with example: obj = BaseContrastEncoder(verbose, cols, mapping, drop_invariant, return_df, handle_unknown, handle_missing)