New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed "Tuple Index Out of range error", unit test and example notebook #48
Conversation
… Python 3 and pandas.
HI, @guitarmind I tried the Madalon Dataset. ipynd provided by the package. It showed the following error message "Type error: unhashable type: slice" from "pandas/core/generic.py line 2487 : res= cache.get (item)". The current python version I used is 3.6.4 pandas is 0.23.4. Could you provide your package setting from your test environment? |
Hi @freshnemo, Are you using the my forked version? The error
In the PR I made a change in the notebook to get X in numpy format:
Note that this PR is not merged so the changes are not applied yet. Test environment:
|
Yes, when I forked the commend you provided, at beginning, Boruta_py can run but will soon stop. If the iteration is 100, Boruta usually stop at 45 iteration and show the error as #47 "if not_selected.shape[0] > 0 and not_selected.shape[1] > 0:" tuple is out of index. |
So what is the stacktrace of error? |
Oh, Sorry, I did not check the "file changed " tab. I modified the code which you provided. Thanks for your help, the code can run. |
Good to know that 👍 |
Edit: Seems like it's working. 😄 Hi @guitarmind, When I change the line 336 to
Before changing it just gives tuple index error in the end but function works properly. Do you have any idea? |
This PR relates to #47, a bug I made in #46.
We should only check the size of 1st dimension of
not_selected
array, as it would be0
already if all features are relevant.This time I have also double-checked that unit test case is passed (fixed a small issue inside as well).
Here is the output log of unit test:
I also discovered some compatibility issues to Python (I'm using 3.6.5) and Pandas in the example notebook while doing correctness test, and it should work well with current version as well!