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

Expose monotonic trend analysis to summary table. #297

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

chunqishi
Copy link

Hi, Guillermo.

Thanks a lot for such great package optbinning.
I used it to variable analysis a lot.
One thing is very cool, this lib has great monotonic analysis.

  1. This monotonic trend results are useful.
    please check paper: https://ojs.aaai.org/index.php/AAAI/article/view/7055

  2. This monotonic analysis can used in boost trees by setting monotonic constraints
    see: https://xgboost.readthedocs.io/en/stable/tutorials/monotonic.html
    see: http://scikit-learn.org/stable/auto_examples/ensemble/plot_monotonic_constraints.html
    see: https://catboost.ai/en/docs/references/training-parameters/common#monotone_constraints

Thus: I modified your develop code by 2 parts.

  1. Export the monotonic trend result to binning process summary dataframe.
    monotonic_trend

  2. Add ranking correlation analysis for continuous binning process to double check monotonic trend output.
    monotonic_score

That's all.

Thank you again.

Copy link
Owner

@guillermo-navas-palencia guillermo-navas-palencia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. I like the idea of showing the monotonic trend in the summary. Regarding the monotonic score using the Kendall tau or Spearman rho correlation, I think we can choose just one and rename it simply as correlation.

optbinning/binning/continuous_binning.py Outdated Show resolved Hide resolved
optbinning/binning/binning_statistics.py Outdated Show resolved Hide resolved
@chunqishi
Copy link
Author

Hi, Guillermo.

Done :- )
correlation

Copy link
Owner

@guillermo-navas-palencia guillermo-navas-palencia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good! Only a minor change and pass flake8.

optbinning/binning/continuous_binning.py Outdated Show resolved Hide resolved
@chunqishi
Copy link
Author

pull failed?

@guillermo-navas-palencia
Copy link
Owner

Yes, there are two types of problems:

I would only focus on the first one. I will deal with the second type before merging to master.

@bmreiniger
Copy link
Contributor

@chunqishi I think this would be a nice addition, can you resolve the first issue above? If needed perhaps we could help, but the logs of the last run have expired; maybe just push a merge from master to kick off a new check?

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

Successfully merging this pull request may close these issues.

None yet

3 participants