Version 0.1.4 breaks gam-changer-adult.ipynb notebook
msplants opened this issue · 2 comments
msplants commented
Hello,
There is a check for nans in 0.1.4 (line 268 of gamchanger.py
) that breaks on string values. If I use version 0.1.3, the notebook still works. I think columns of string type should be encoded before this check.
Thanks,
Jessica
[/usr/local/lib/python3.7/dist-packages/gamchanger/gamchanger.py](https://localhost:8080/#) in get_sample_data(ebm, x_test, y_test, resort_categorical)
266
267 # Drop all rows with any NA values
--> 268 if np.isnan(x_test_copy).any():
269 na_row_indexes = np.isnan(x_test_copy).any(axis=1)
270 x_test_copy = x_test_copy[~na_row_indexes]
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
xiaohk commented