Skip to content
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

The sorting of model analytics output is incorrect in predictor.py #411

Open
abhishekvij opened this issue Aug 24, 2018 · 1 comment
Open

Comments

@abhishekvij
Copy link

abhishekvij commented Aug 24, 2018

The bug is in function "_join_and_print_analytics_results"

the current code block is

    df_results = df_results.reset_index(drop=True)
    df_results = df_results.head(n=100)
    df_results = df_results.sort_values(by=sort_field, ascending=True)

The code should be

    df_results = df_results.sort_values(by=sort_field, ascending=False)
    df_results = df_results.reset_index(drop=True)
    df_results = df_results.head(n=100)

we need to sort in Descending order ( so higher importance features get selected ) first and then do resetting of index and selecting top 100 other wise there is no guarantee that the actual top 100 would be selected.

I am new to github ( not a software engineer :( ), so I don't know whether the branch (fix_sorting_bug_join_and_print_analytics_results) I created and pushed is the right way of doing things. Please let me know if you want me to push changes in a different manner.

Edit : Can't seem to find my branch in here, i guess i need permission from the author to fix this.

@above-c-level
Copy link

@abhishekvij Hey there! It appears that this repository is no longer being actively maintained. However, I still think it's a great idea, so I've started working on my own version of it, which you can find here. It's worth pointing out that I've dropped Python 2.7 support, so you'll have to upgrade if you haven't already.

All that stuff up there is copy-pasted, but I've gone ahead and implemented your recommendations into my current branch and should go into master on the next merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants