code: def test_catBoost_reference(self):
      # The reference is from:
      #   https://catboost.ai/docs/concepts/algorithm-main-stages_cat-to-numberic.html
      # paragraph:
      #     Transforming categorical features to numerical features in classification
      # as obtained on 17 Aug 2019.
      X = pd.DataFrame(
          {
              "col1": [
                  "rock",
                  "indie",
                  "rock",
                  "rock",
                  "pop",
                  "indie",
                  "rock",
              ]
          }
      )
      y = pd.Series([0, 0, 1, 1, 1, 0, 0])
      enc = encoders.CatBoostEncoder()
      obtained = enc.fit_transform(X, y)
      prior = (
          3.0 / 7
      )  # Since we do not support prior passing, we replace the prior in the reference = 0.05 with the sample prior = 3/7.
      self.assertEqual(
          list(obtained["col1"]),
          [
              prior,
              prior,
              prior / 2,
              (1 + prior) / 3,
              prior,
              prior / 2,
              (2 + prior) / 4,
          ],
      )
  
file_path: category_encoders/tests/test_cat_boost.py
imports: import pandas
  import numpy
  from unittest import TestCase
  import category_encoders
label_desc: Use image node_id 3 for calling the TestCatBoostEncoder obj's underlying member method code with example usage: obj.test_catBoost_reference() without return types