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
After Change
enc.fit(X)
out = enc.transform(X_t)
self.assertTrue(np.isin([31, 28, 41], out["none"].unique()).all())
self.assertTrue(out["none"].unique().shape == (3,))
self.assertTrue(out["none"].isna().sum() == 0)
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,))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: maciejkula/spotlight
Commit Name: b14ddcdcfb9c05bd1fdf7adf0eedf0737a97db27
Time: 2017-10-13
Author: maciej.kula@gmail.com
File Name: tests/test_evaluation_metrics.py
Class Name:
Method Name: test_precision_recall
Project Name: scikit-learn-contrib/lightning
Commit Name: 6594fd8bdfba3cc808b3852cf380125e7e9df03e
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_dual_cd.py
Class Name:
Method Name: test_warm_start