5f6f1a37c2f84acfb838470faabb85ae36b4dbc2,tests/col_generation/test_binarize.py,,test_binarize_one_no_drop,#,108
Before Change
def test_binarize_one_no_drop():
Basic binning test.
df = _one_categ_df()
res_df = Binarize("Born", drop=False).apply(df, verbose=True)
assert "Greece" not in res_df.columns
assert "Born" 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" in res_df2.columns
assert res_df2["Born"][1] == "Greece"
assert "Born_Greece" not in res_df2.columns
assert "Born_UK" in res_df2.columns
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_one_no_drop
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_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_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_one