d7dfef48a5afaf3d3a664ca9997baecd50c94cd6,category_encoders/tests/test_count.py,TestCountEncoder,test_count_min_group_size_int,#TestCountEncoder#,29

Before Change


        self.assertEqual(len(set(out["extra"].values)), 4)

        // single group under threshold
        enc = encoders.CountEncoder(verbose=1, min_group_size=30)
        enc.fit(X)
        out = enc.transform(X_t)
        self.assertEqual(len(set(out["extra"].values)), 4)

        // multiple groups under threshold
        enc = encoders.CountEncoder(verbose=1, min_group_size=35)

After Change


        self.assertIn("B_nan", enc.mapping["none"])
        self.assertTrue(np.isin([28, 25, 19], out["na_categorical"].unique()).all())
        self.assertTrue(out["na_categorical"].unique().shape == (3,))
        self.assertTrue(enc.mapping is not None)
        self.assertIn(np.nan, enc.mapping["na_categorical"])

    def test_count_min_group_size_dict(self):
        Test the min_group_size dict on "none" and "na_categorical".
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: d7dfef48a5afaf3d3a664ca9997baecd50c94cd6
Time: 2019-05-17
Author: joshua.dunn@engie.com
File Name: category_encoders/tests/test_count.py
Class Name: TestCountEncoder
Method Name: test_count_min_group_size_int


Project Name: tyarkoni/pliers
Commit Name: e98d99e745b61af768bd30fd9bad7c892eefbe17
Time: 2016-10-20
Author: quinten.mcnamara@gmail.com
File Name: featurex/tests/test_extractors.py
Class Name:
Method Name: test_clarifaiAPI_extractor


Project Name: tyarkoni/pliers
Commit Name: b0c01be0aa97ff38c36826a9f424a1c07ae8e017
Time: 2020-02-27
Author: rbrrcc@gmail.com
File Name: pliers/tests/extractors/test_audio_extractors.py
Class Name:
Method Name: test_audioset_extractor