class_docstr: The ArbitraryDiscretiser() divides numerical variables into intervals which limits
  are determined by the user. Thus, it works only with numerical variables.
  
  You need to enter a dictionary with variable names as keys, and a list with
  the limits of the intervals as values. For example the key could be the variable
  name 'var1' and the value the following list: [0, 10, 100, 1000]. The
  ArbitraryDiscretiser() will then sort var1 values into the intervals 0-10,
  10-100, 100-1000, and var2 into 5-10, 10-15 and 15-20. Similar to `pandas.cut`.
  
  More details in the :ref:`User Guide <arbitrary_discretiser>`.
  
  Parameters
  ----------
  binning_dict: dict
      The dictionary with the variable to interval limits pairs.
  
  {return_object}
  
  {return_boundaries}
  
  errors: string, default='ignore'
      Indicates what to do when a value is outside the limits indicated in the
      'binning_dict'. If 'raise', the transformation will raise an error.
      If 'ignore', values outside the limits are returned as NaN
      and a warning will be raised instead.
  
  Attributes
  ----------
  {binner_dict_}
  
  {variables_}
  
  {feature_names_in_}
  
  {n_features_in_}
  
  Methods
  -------
  {fit}
  
  {fit_transform}
  
  {transform}
  
  See Also
  --------
  pandas.cut
  
  Examples
  --------
  
  >>> import pandas as pd
  >>> import numpy as np
  >>> from feature_engine.discretisation import ArbitraryDiscretiser
  >>> np.random.seed(42)
  >>> X = pd.DataFrame(dict(x = np.random.randint(1,100, 100)))
  >>> bins = dict(x =  [0, 25, 50, 75, 100])
  >>> ad = ArbitraryDiscretiser(binning_dict = bins)
  >>> ad.fit(X)
  >>> ad.transform(X)["x"].value_counts()
  2    31
  0    27
  3    25
  1    17
  Name: x, dtype: int64
code: def __init__(
      self,
      binning_dict: Dict[Union[str, int], List[Union[str, int]]],
      return_object: bool = False,
      return_boundaries: bool = False,
      errors: str = "ignore",
  ) -> None:
      if not isinstance(binning_dict, dict):
          raise ValueError(
              "binning_dict must be a dictionary with the interval limits per "
              f"variable. Got {binning_dict} instead."
          )
  
      if errors not in ["ignore", "raise"]:
          raise ValueError(
              "errors only takes values 'ignore' and 'raise'. "
              f"Got {errors} instead."
          )
  
      super().__init__(return_object, return_boundaries)
  
      self.binning_dict = binning_dict
      self.errors = errors
  
file_path: feature_engine/feature_engine/discretisation/arbitrary.py
imports: import warnings
  from typing import Dict, List, Optional, Union
  import pandas
  from feature_engine._base_transformers.mixins import FitFromDictMixin
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring, _variables_attribute_docstring
  from feature_engine._docstrings.methods import _fit_not_learn_docstring, _fit_transform_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine.discretisation.base_discretiser import BaseDiscretiser
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 to create a new ArbitraryDiscretiser object from inherited base classes: BaseDiscretiser, FitFromDictMixin with example: obj = ArbitraryDiscretiser(binning_dict, return_object, return_boundaries, errors)