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

Align WoE #72

Closed
orchardbirds opened this issue Nov 17, 2021 · 4 comments · Fixed by #73
Closed

Align WoE #72

orchardbirds opened this issue Nov 17, 2021 · 4 comments · Fixed by #73
Labels
bug Something isn't working

Comments

@orchardbirds
Copy link
Contributor

The bucket_table function is reporting a WoE different to the woe_1d function. Which is correct?

The WoE function should be done in one place.

@orchardbirds orchardbirds added the bug Something isn't working label Nov 17, 2021
@sbjelogr
Copy link
Contributor

It was like this at some point, but apparently it was changed recently.
I would recommend using one function across the library (like woe_1d).

The most common practice is to have woe=log(%G/%B).
For the purpose of the calculations it does not matter (it's just a sign difference), as long as it is consistent throughout the package.

@orchardbirds
Copy link
Contributor Author

Yeah unfortunately I've found it's more than a sign difference for certain values. Will do more digging

@orchardbirds
Copy link
Contributor Author

Found the bug @sbjelogr .

In metrics.py we had python df = pd.concat([X, y], axis=1, ignore_index=True) on line 32.

If X comes from train_test_split, it will have bad indices which means the df doesn't concatenate properly. We just need to add:

X = X.copy().reset_index(drop=True)

on line 22. Fixing tests now, then will commit

orchardbirds pushed a commit that referenced this issue Nov 18, 2021
@orchardbirds orchardbirds mentioned this issue Nov 18, 2021
@timvink
Copy link
Contributor

timvink commented Nov 18, 2021

Nice work !

orchardbirds pushed a commit that referenced this issue Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants