5f6f1a37c2f84acfb838470faabb85ae36b4dbc2,tests/col_generation/test_binarize.py,,test_binarize_with_dummy_na,#,92
Before Change
def test_binarize_with_dummy_na():
Basic binning test.
df = _one_categ_df_with_nan()
res_df = Binarize("Born", dummy_na=True).apply(df)
assert "Born" not in res_df.columns
assert "Born_nan" not in res_df.columns
assert "Born_UK" in res_df.columns
assert res_df["Born_UK"][1] == 0
After Change
assert res_df["Born_USA"][3] == 0
// check when fitted
df2 = _one_categ_single_row_df()
assert binarize.is_fitted
res_df2 = binarize(df2, verbose=True)
print(res_df2)
assert "Born" not in res_df2.columns
assert "Born_nan" not in res_df2.columns
assert "Born_USA" in res_df.columns
assert res_df2["Born_USA"][1] == 0
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances
Project Name: shaypal5/pdpipe
Commit Name: 5f6f1a37c2f84acfb838470faabb85ae36b4dbc2
Time: 2018-02-04
Author: shay@zencity.io
File Name: tests/col_generation/test_binarize.py
Class Name:
Method Name: test_binarize_with_dummy_na
Project Name: shaypal5/pdpipe
Commit Name: 5f6f1a37c2f84acfb838470faabb85ae36b4dbc2
Time: 2018-02-04
Author: shay@zencity.io
File Name: tests/col_generation/test_binarize.py
Class Name:
Method Name: test_binarize_no_drop_first
Project Name: shaypal5/pdpipe
Commit Name: 5f6f1a37c2f84acfb838470faabb85ae36b4dbc2
Time: 2018-02-04
Author: shay@zencity.io
File Name: tests/col_generation/test_binarize.py
Class Name:
Method Name: test_binarize_one
Project Name: shaypal5/pdpipe
Commit Name: 5f6f1a37c2f84acfb838470faabb85ae36b4dbc2
Time: 2018-02-04
Author: shay@zencity.io
File Name: tests/col_generation/test_binarize.py
Class Name:
Method Name: test_binarize_with_nan
Project Name: shaypal5/pdpipe
Commit Name: 5f6f1a37c2f84acfb838470faabb85ae36b4dbc2
Time: 2018-02-04
Author: shay@zencity.io
File Name: tests/col_generation/test_binarize.py
Class Name:
Method Name: test_binarize_one_no_drop