ClimbsRocks / auto_ml

[UNMAINTAINED] Automated machine learning for analytics & production
http://auto-ml.readthedocs.io
MIT License
1.64k stars 310 forks source link

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

Open abhishekvij opened 6 years ago

abhishekvij commented 6 years ago

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 commented 5 years ago

@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.