Repository: sdv-dev/RDT (language: python)

Issue:
Update `BooleanTransformer` to make it user friendly
### Problem Description

Let's update `BooleanTransformer` to make it more user friendly.

### Expected behavior

Name: `BinaryEncoder`

Functionality: 

- Missing value handling (see #362)
- Change `columns` (see #376 )
- Add `'mode'` as an option to replace missing values

```python
from transformers.boolean import BinaryEncoder

>>> be = BinaryEncoder(missing_value_replacement='mode')
>>> be = BinaryEncoder(missing_value_replacement=1, model_missing_values=True) 

>>> be.fit(data, column='user_is_active')
```


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index ec67db12e..538e96701 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -14,7 +14,7 @@ jobs:
     steps:
     - uses: actions/checkout@v1
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v1
+      uses: actions/setup-python@v2
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
diff --git a/.github/workflows/minimum.yml b/.github/workflows/minimum.yml
index 512c506de..792ca7b1e 100644
--- a/.github/workflows/minimum.yml
+++ b/.github/workflows/minimum.yml
@@ -14,7 +14,7 @@ jobs:
     steps:
     - uses: actions/checkout@v1
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v1
+      uses: actions/setup-python@v2
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml
index e2e14e236..b8acce1bf 100644
--- a/.github/workflows/unit.yml
+++ b/.github/workflows/unit.yml
@@ -14,7 +14,7 @@ jobs:
     steps:
     - uses: actions/checkout@v1
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v1
+      uses: actions/setup-python@v2
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 5e9b1ec99..45018608a 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -203,7 +203,7 @@ check and whether or not it passed.
 
    In [1]: from tests.contributing import validate_transformer_code_style
 
-   In [2]: valid = validate_transformer_code_style('rdt.transformers.BooleanTransformer') # Replace BooleanTransformer with your transformer
+   In [2]: valid = validate_transformer_code_style('rdt.transformers.BinaryEncoder') # Replace BinaryEncoder with your transformer
    Validating source file C:\Datacebo\RDT\rdt\transformers\boolean.py
 
    SUCCESS: The code style is correct.
@@ -245,24 +245,24 @@ prints a table summarizing the test coverage and provides a link to the full cov
 
    In [1]: from tests.contributing import validate_transformer_unit_tests
 
-   In [2]: test_coverage = validate_transformer_unit_tests('rdt.transformers.BooleanTransformer') # Replace BooleanTransformer with your transformer
+   In [2]: test_coverage = validate_transformer_unit_tests('rdt.transformers.BinaryEncoder') # Replace BinaryEncoder with your transformer
    Validating source file C:\Datacebo\RDT\rdt\transformers\boolean.py
 
    ================================================= test session starts =================================================
    collected 12 items
 
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test___init__ PASSED                            [  8%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__fit_array PASSED                          [ 16%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__fit_nan_ignore PASSED                     [ 25%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__fit_nan_not_ignore PASSED                 [ 33%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__reverse_transform_2d_ndarray PASSED       [ 41%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__reverse_transform_float_values PASSED     [ 50%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__reverse_transform_float_values_out_of_range PASSED [ 58%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__reverse_transform_nan_ignore PASSED       [ 66%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__reverse_transform_nan_not_ignore PASSED   [ 75%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__reverse_transform_not_null_values PASSED  [ 83%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__transform_array PASSED                    [ 91%]
-   tests/unit/transformers/test_boolean.py::TestBooleanTransformer::test__transform_series PASSED                   [100%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test___init__ PASSED                            [  8%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__fit_array PASSED                          [ 16%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__fit_nan_ignore PASSED                     [ 25%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__fit_nan_not_ignore PASSED                 [ 33%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__reverse_transform_2d_ndarray PASSED       [ 41%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__reverse_transform_float_values PASSED     [ 50%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__reverse_transform_float_values_out_of_range PASSED [ 58%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__reverse_transform_nan_ignore PASSED       [ 66%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__reverse_transform_nan_not_ignore PASSED   [ 75%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__reverse_transform_not_null_values PASSED  [ 83%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__transform_array PASSED                    [ 91%]
+   tests/unit/transformers/test_boolean.py::TestBinaryEncoder::test__transform_series PASSED                   [100%]
 
    ============================================ 12 passed, 1 warning in 0.08s ============================================
 
@@ -318,8 +318,8 @@ checks. It also prints a table describing each check and whether or not it passe
 
    In [1]: from tests.contributing import validate_transformer_integration
 
-   In [2]: valid = validate_transformer_integration('rdt.transformers.BooleanTransformer') # Replace BooleanTransformer with your transformer
-   Validating Integration Tests for transformer BooleanTransformer
+   In [2]: valid = validate_transformer_integration('rdt.transformers.BinaryEncoder') # Replace BinaryEncoder with your transformer
+   Validating Integration Tests for transformer BinaryEncoder
 
    SUCCESS: The integration tests were successful.
 
@@ -488,7 +488,7 @@ above. It also prints a table summarizing the results of all these checks.
 
    In [1]: from tests.contributing import validate_pull_request
 
-   In [2]: valid = validate_pull_request('rdt.transformers.BooleanTransformer') # Replace BooleanTransformer with your transformer
+   In [2]: valid = validate_pull_request('rdt.transformers.BinaryEncoder') # Replace BinaryEncoder with your transformer
    ...................
 
    Check              Correct    Details
diff --git a/rdt/performance/performance.py b/rdt/performance/performance.py
index 3b9e70dee..c7cc842f8 100644
--- a/rdt/performance/performance.py
+++ b/rdt/performance/performance.py
@@ -11,7 +11,7 @@
 
 # Additional arguments for transformers
 TRANSFORMER_ARGS = {
-    'BooleanTransformer': {
+    'BinaryEncoder': {
         'missing_value_replacement': -1,
         'model_missing_values': True
     },
diff --git a/rdt/transformers/__init__.py b/rdt/transformers/__init__.py
index 6ef45f70f..313e66879 100644
--- a/rdt/transformers/__init__.py
+++ b/rdt/transformers/__init__.py
@@ -9,7 +9,7 @@
 from pathlib import Path
 
 from rdt.transformers.base import BaseTransformer
-from rdt.transformers.boolean import BooleanTransformer
+from rdt.transformers.boolean import BinaryEncoder
 from rdt.transformers.categorical import FrequencyEncoder
 from rdt.transformers.datetime import UnixTimestampEncoder
 from rdt.transformers.null import NullTransformer
@@ -53,7 +53,7 @@ def _import_addons():
     'integer': FloatFormatter,
     'float': FloatFormatter,
     'categorical': FrequencyEncoder(add_noise=True),
-    'boolean': BooleanTransformer,
+    'boolean': BinaryEncoder,
     'datetime': UnixTimestampEncoder,
 }
 
diff --git a/rdt/transformers/boolean.py b/rdt/transformers/boolean.py
index bc023d0a3..9396efd6c 100644
--- a/rdt/transformers/boolean.py
+++ b/rdt/transformers/boolean.py
@@ -7,7 +7,7 @@
 from rdt.transformers.null import NullTransformer
 
 
-class BooleanTransformer(BaseTransformer):
+class BinaryEncoder(BaseTransformer):
     """Transformer for boolean data.
 
     This transformer replaces boolean values with their integer representation


Test patch:
diff --git a/tests/integration/test_hyper_transformer.py b/tests/integration/test_hyper_transformer.py
index 1f36a67a6..e08b077e7 100644
--- a/tests/integration/test_hyper_transformer.py
+++ b/tests/integration/test_hyper_transformer.py
@@ -8,7 +8,7 @@
 
 from rdt import HyperTransformer
 from rdt.transformers import (
-    DEFAULT_TRANSFORMERS, BaseTransformer, BooleanTransformer, FloatFormatter, FrequencyEncoder,
+    DEFAULT_TRANSFORMERS, BaseTransformer, BinaryEncoder, FloatFormatter, FrequencyEncoder,
     OneHotEncoder, UnixTimestampEncoder)
 
 
@@ -177,7 +177,7 @@ def test_hypertransformer_default_inputs():
     assert ht._transformers_tree['float']['outputs'] == ['float.value']
     assert isinstance(ht._transformers_tree['categorical']['transformer'], FrequencyEncoder)
     assert ht._transformers_tree['categorical']['outputs'] == ['categorical.value']
-    assert isinstance(ht._transformers_tree['bool']['transformer'], BooleanTransformer)
+    assert isinstance(ht._transformers_tree['bool']['transformer'], BinaryEncoder)
     assert ht._transformers_tree['bool']['outputs'] == ['bool.value']
     assert isinstance(ht._transformers_tree['datetime']['transformer'], UnixTimestampEncoder)
     assert ht._transformers_tree['datetime']['outputs'] == ['datetime.value']
@@ -210,7 +210,7 @@ def test_hypertransformer_field_transformers():
         'integer': FloatFormatter,
         'float': FloatFormatter,
         'categorical': FrequencyEncoder,
-        'bool': BooleanTransformer,
+        'bool': BinaryEncoder,
         'datetime': DummyTransformerNotMLReady,
         'datetime.value': FrequencyEncoder,
         'names': FrequencyEncoder
diff --git a/tests/integration/test_transformers.py b/tests/integration/test_transformers.py
index a385e6e4d..1f9aef6e9 100644
--- a/tests/integration/test_transformers.py
+++ b/tests/integration/test_transformers.py
@@ -15,7 +15,7 @@
 
 # Additional arguments for transformers
 TRANSFORMER_ARGS = {
-    'BooleanTransformer': {
+    'BinaryEncoder': {
         'missing_value_replacement': -1,
         'model_missing_values': True
     },
diff --git a/tests/integration/transformers/test_boolean.py b/tests/integration/transformers/test_boolean.py
index 3a23ad47c..70e0ee9ed 100644
--- a/tests/integration/transformers/test_boolean.py
+++ b/tests/integration/transformers/test_boolean.py
@@ -1,15 +1,15 @@
 import numpy as np
 import pandas as pd
 
-from rdt.transformers import BooleanTransformer
+from rdt.transformers import BinaryEncoder
 
 
-class TestBooleanTransformer:
+class TestBinaryEncoder:
 
     def test_boolean_some_nans(self):
-        """Test BooleanTransformer on input with some nan values.
+        """Test BinaryEncoder on input with some nan values.
 
-        Ensure that the BooleanTransformer can fit, transform, and reverse
+        Ensure that the BinaryEncoder can fit, transform, and reverse
         transform on boolean data with Nones. Expect that the reverse
         transformed data is the same as the input.
 
@@ -21,7 +21,7 @@ def test_boolean_some_nans(self):
         # Setup
         data = pd.DataFrame([True, False, None, False], columns=['bool'])
         column = 'bool'
-        transformer = BooleanTransformer()
+        transformer = BinaryEncoder()
 
         # Run
         transformer.fit(data, column)
@@ -32,9 +32,9 @@ def test_boolean_some_nans(self):
         pd.testing.assert_frame_equal(reverse, data)
 
     def test_boolean_all_nans(self):
-        """Test BooleanTransformer on input with all nan values.
+        """Test BinaryEncoder on input with all nan values.
 
-        Ensure that the BooleanTransformer can fit, transform, and reverse
+        Ensure that the BinaryEncoder can fit, transform, and reverse
         transform on boolean data with all Nones. Expect that the reverse
         transformed data is the same as the input.
 
@@ -46,7 +46,7 @@ def test_boolean_all_nans(self):
         # Setup
         data = pd.DataFrame([None, None, None, None], columns=['bool'])
         column = 'bool'
-        transformer = BooleanTransformer()
+        transformer = BinaryEncoder()
 
         # Run
         transformer.fit(data, column)
@@ -57,14 +57,12 @@ def test_boolean_all_nans(self):
         pd.testing.assert_frame_equal(reverse, data)
 
     def test_boolean_input_unchanged(self):
-        """Test BooleanTransformer on input with some nan values.
+        """Test BinaryEncoder doesn't affect transformed data.
 
-        Ensure that the BooleanTransformer can fit, transform, and reverse
-        transform on boolean data with all Nones. Expect that the intermediate
-        transformed data is unchanged.
+        Ensure that the intermediate transformed data is unchanged after reverse transforming.
 
         Input:
-            - 4 rows of all None values
+            - boolean data
         Output:
             - The reversed transformed data
         Side effects:
@@ -73,7 +71,7 @@ def test_boolean_input_unchanged(self):
         # Setup
         data = pd.DataFrame([True, False, None, False], columns=['bool'])
         column = 'bool'
-        transformer = BooleanTransformer()
+        transformer = BinaryEncoder()
 
         # Run
         transformer.fit(data, column)
@@ -84,3 +82,34 @@ def test_boolean_input_unchanged(self):
         # Assert
         pd.testing.assert_frame_equal(reverse, data)
         np.testing.assert_array_equal(unchanged_transformed, transformed)
+
+    def test_boolean_missing_value_replacement_mode(self):
+        """Test BinaryEncoder when `missing_value_replacement` is set to 'mode'.
+
+        Ensure that the BinaryEncoder can fit, transform, and reverse transform on
+        boolean data when `missing_value_replacement` is set to `'mode'` and
+        `model_missing_values` is set to True. Expect that the reverse
+        transformed data is the same as the input.
+
+        Input:
+            - boolean data with None values
+        Output:
+            - The reversed transformed data
+        """
+        # Setup
+        data = pd.DataFrame([True, True, None, False], columns=['bool'])
+        column = 'bool'
+        transformer = BinaryEncoder(missing_value_replacement='mode', model_missing_values=True)
+
+        # Run
+        transformer.fit(data, column)
+        transformed = transformer.transform(data)
+        reverse = transformer.reverse_transform(transformed)
+
+        # Assert
+        expected_transformed = pd.DataFrame({
+            'bool.value': [1., 1., 1., 0.],
+            'bool.is_null': [0., 0., 1., 0.]
+        })
+        pd.testing.assert_frame_equal(transformed, expected_transformed)
+        pd.testing.assert_frame_equal(reverse, data)
diff --git a/tests/unit/test_hyper_transformer.py b/tests/unit/test_hyper_transformer.py
index 5313671fd..8860f5f3e 100644
--- a/tests/unit/test_hyper_transformer.py
+++ b/tests/unit/test_hyper_transformer.py
@@ -8,7 +8,7 @@
 from rdt import HyperTransformer
 from rdt.errors import NotFittedError
 from rdt.transformers import (
-    BooleanTransformer, FloatFormatter, FrequencyEncoder, GaussianNormalizer, OneHotEncoder,
+    BinaryEncoder, FloatFormatter, FrequencyEncoder, GaussianNormalizer, OneHotEncoder,
     UnixTimestampEncoder)
 
 
@@ -79,7 +79,7 @@ def test__unfit(self):
         """
         # Setup
         ht = HyperTransformer()
-        ht._transformers_sequence = [BooleanTransformer(), FloatFormatter()]
+        ht._transformers_sequence = [BinaryEncoder(), FloatFormatter()]
         ht._fitted = True
 
         # Run
@@ -107,7 +107,7 @@ def test__create_multi_column_fields(self):
         # Setup
         ht = HyperTransformer()
         ht.field_transformers = {
-            'a': BooleanTransformer,
+            'a': BinaryEncoder,
             'b': UnixTimestampEncoder,
             ('c', 'd'): UnixTimestampEncoder,
             'e': FloatFormatter
@@ -923,13 +923,13 @@ def test_update_default_data_type_transformers(self):
         ht._unfit = Mock()
 
         # Run
-        ht.update_default_data_type_transformers({'boolean': BooleanTransformer})
+        ht.update_default_data_type_transformers({'boolean': BinaryEncoder})
 
         # Assert
         assert ht.default_data_type_transformers == {
             'categorical': FrequencyEncoder,
             'integer': FloatFormatter,
-            'boolean': BooleanTransformer
+            'boolean': BinaryEncoder
         }
         ht._unfit.assert_called_once()
 
@@ -957,7 +957,7 @@ def test_set_first_transformers_for_fields(self):
 
         # Run
         ht.set_first_transformers_for_fields({
-            'c': BooleanTransformer,
+            'c': BinaryEncoder,
             'b': FrequencyEncoder
         })
 
@@ -965,7 +965,7 @@ def test_set_first_transformers_for_fields(self):
         assert ht.field_transformers == {
             'a': FrequencyEncoder,
             'b': FrequencyEncoder,
-            'c': BooleanTransformer
+            'c': BinaryEncoder
         }
         ht._unfit.assert_called_once()
 
diff --git a/tests/unit/transformers/test___init__.py b/tests/unit/transformers/test___init__.py
index b0f1e3e8f..b4c82896a 100644
--- a/tests/unit/transformers/test___init__.py
+++ b/tests/unit/transformers/test___init__.py
@@ -1,4 +1,4 @@
-from rdt.transformers import BooleanTransformer, get_transformer_class, get_transformer_instance
+from rdt.transformers import BinaryEncoder, get_transformer_class, get_transformer_instance
 
 
 def test_get_transformer_class_transformer_name():
@@ -13,13 +13,13 @@ def test_get_transformer_class_transformer_name():
         - the class corresponding to the transformer name.
     """
     # Setup
-    transformer_name = 'BooleanTransformer'
+    transformer_name = 'BinaryEncoder'
 
     # Run
     returned = get_transformer_class(transformer_name)
 
     # Assert
-    assert returned == BooleanTransformer
+    assert returned == BinaryEncoder
 
 
 def test_get_transformer_class_transformer_path():
@@ -34,35 +34,35 @@ def test_get_transformer_class_transformer_path():
         - the class corresponding to the transformer path.
     """
     # Setup
-    transformer_path = 'rdt.transformers.BooleanTransformer'
+    transformer_path = 'rdt.transformers.BinaryEncoder'
 
     # Run
     returned = get_transformer_class(transformer_path)
 
     # Assert
-    assert returned == BooleanTransformer
+    assert returned == BinaryEncoder
 
 
 def test_get_transformer_instance_instance():
-    transformer = BooleanTransformer(missing_value_replacement=None)
+    transformer = BinaryEncoder(missing_value_replacement=None)
 
     returned = get_transformer_instance(transformer)
 
-    assert isinstance(returned, BooleanTransformer)
+    assert isinstance(returned, BinaryEncoder)
     assert returned.missing_value_replacement is None
 
 
 def test_get_transformer_instance_str():
-    transformer = 'BooleanTransformer'
+    transformer = 'BinaryEncoder'
 
     returned = get_transformer_instance(transformer)
 
-    assert isinstance(returned, BooleanTransformer)
+    assert isinstance(returned, BinaryEncoder)
 
 
 def test_get_transformer_instance_class():
-    transformer = BooleanTransformer
+    transformer = BinaryEncoder
 
     returned = get_transformer_instance(transformer)
 
-    assert isinstance(returned, BooleanTransformer)
+    assert isinstance(returned, BinaryEncoder)
diff --git a/tests/unit/transformers/test_boolean.py b/tests/unit/transformers/test_boolean.py
index 1942b56ef..4803f6806 100644
--- a/tests/unit/transformers/test_boolean.py
+++ b/tests/unit/transformers/test_boolean.py
@@ -4,16 +4,16 @@
 import numpy as np
 import pandas as pd
 
-from rdt.transformers import BooleanTransformer
+from rdt.transformers import BinaryEncoder
 from rdt.transformers.null import NullTransformer
 
 
-class TestBooleanTransformer(TestCase):
+class TestBinaryEncoder(TestCase):
 
     def test___init__(self):
         """Test default instance"""
         # Run
-        transformer = BooleanTransformer()
+        transformer = BinaryEncoder()
 
         # Asserts
         error_message = 'Unexpected missing_value_replacement'
@@ -32,7 +32,7 @@ def test_get_output_types_model_missing_values_column_created(self):
         }
 
         Setup:
-            - initialize a ``BooleanTransformer`` transformer which:
+            - initialize a ``BinaryEncoder`` transformer which:
                 - sets ``self.null_transformer`` to a ``NullTransformer`` where
                 ``self._model_missing_values`` is True.
                 - sets ``self.column_prefix`` to a string.
@@ -42,7 +42,7 @@ def test_get_output_types_model_missing_values_column_created(self):
             added to the beginning of the keys.
         """
         # Setup
-        transformer = BooleanTransformer()
+        transformer = BinaryEncoder()
         transformer.null_transformer = NullTransformer(missing_value_replacement='fill')
         transformer.null_transformer._model_missing_values = True
         transformer.column_prefix = 'abc'
@@ -63,7 +63,7 @@ def test__fit_missing_value_replacement_ignore(self):
         data = pd.Series([False, True, True, False, True])
 
         # Run
-        transformer = BooleanTransformer(missing_value_replacement=None)
+        transformer = BinaryEncoder(missing_value_replacement=None)
         transformer._fit(data)
 
         # Asserts
@@ -76,7 +76,7 @@ def test__fit_missing_value_replacement_not_ignore(self):
         data = pd.Series([False, True, True, False, True])
 
         # Run
-        transformer = BooleanTransformer(missing_value_replacement=0)
+        transformer = BinaryEncoder(missing_value_replacement=0)
         transformer._fit(data)
 
         # Asserts
@@ -89,7 +89,7 @@ def test__fit_array(self):
         data = pd.Series([False, True, True, False, True])
 
         # Run
-        transformer = BooleanTransformer(missing_value_replacement=0)
+        transformer = BinaryEncoder(missing_value_replacement=0)
         transformer._fit(data)
 
         # Asserts
@@ -104,7 +104,7 @@ def test__transform_series(self):
         # Run
         transformer = Mock()
 
-        BooleanTransformer._transform(transformer, data)
+        BinaryEncoder._transform(transformer, data)
 
         # Asserts
         expect_call_count = 1
@@ -125,7 +125,7 @@ def test__transform_array(self):
         # Run
         transformer = Mock()
 
-        BooleanTransformer._transform(transformer, data)
+        BinaryEncoder._transform(transformer, data)
 
         # Asserts
         expect_call_count = 1
@@ -147,7 +147,7 @@ def test__reverse_transform_missing_value_replacement_ignore(self):
         transformer = Mock()
         transformer.missing_value_replacement = None
 
-        result = BooleanTransformer._reverse_transform(transformer, data)
+        result = BinaryEncoder._reverse_transform(transformer, data)
 
         # Asserts
         expect = np.array([False, True, False, True, False])
@@ -172,7 +172,7 @@ def test__reverse_transform_missing_value_replacement_not_ignore(self):
         transformer.missing_value_replacement = 0
         transformer.null_transformer.reverse_transform.return_value = transformed_data
 
-        result = BooleanTransformer._reverse_transform(transformer, data)
+        result = BinaryEncoder._reverse_transform(transformer, data)
 
         # Asserts
         expect = np.array([False, True, False, True, False])
@@ -196,7 +196,7 @@ def test__reverse_transform_not_null_values(self):
         transformer = Mock()
         transformer.missing_value_replacement = None
 
-        result = BooleanTransformer._reverse_transform(transformer, data)
+        result = BinaryEncoder._reverse_transform(transformer, data)
 
         # Asserts
         expected = np.array([True, False, True])
@@ -213,7 +213,7 @@ def test__reverse_transform_2d_ndarray(self):
         transformer = Mock()
         transformer.missing_value_replacement = None
 
-        result = BooleanTransformer._reverse_transform(transformer, data)
+        result = BinaryEncoder._reverse_transform(transformer, data)
 
         # Asserts
         expected = np.array([True, False, True])
@@ -238,7 +238,7 @@ def test__reverse_transform_float_values(self):
         transformer.missing_value_replacement = None
 
         # Run
-        result = BooleanTransformer._reverse_transform(transformer, data)
+        result = BinaryEncoder._reverse_transform(transformer, data)
 
         # Asserts
         expected = np.array([True, False, True])
@@ -264,7 +264,7 @@ def test__reverse_transform_float_values_out_of_range(self):
         transformer.missing_value_replacement = None
 
         # Run
-        result = BooleanTransformer._reverse_transform(transformer, data)
+        result = BinaryEncoder._reverse_transform(transformer, data)
 
         # Asserts
         expected = np.array([True, False, True])