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

compare_continuous doesn't work, and compare_categorical get all predictors #36

Open
xuy1116 opened this issue May 8, 2020 · 4 comments

Comments

@xuy1116
Copy link

xuy1116 commented May 8, 2020

compare_continuous doesn't work, got error below.
KeyError: "None of [Index(['var', 'ks_before', 'ks_after', 'grouped_chisqr_before',\n 'grouped_chisqr_after', 'std_median_diff_before',\n 'std_median_diff_after', 'std_mean_diff_before', 'std_mean_diff_after'],\n dtype='object')] are in the [columns]"

But compare_categorical gets to
Capture
all predictors even they are continous variables.

@HRK777
Copy link

HRK777 commented Jul 24, 2020

facing the exact same issue ... any updates?

@dompas
Copy link

dompas commented Aug 6, 2020

I have resolved this issue by changing a part of the code of compare_continuous and compare_categorical on both I stopped using the uf.is_continuous and did exactly the same thing directly on the functions.

is_continuous = (col in self.X.columns) or ("Q('{}')".format(col) in self.X.columns)
if is_continuous and (not(col in self.exclude)):
is_continuous = (col in self.X.columns) or ("Q('{}')".format(col) in self.X.columns)
if (not is_continuous) and (not(col in self.exclude)):

@ChristinaMin
Copy link

ChristinaMin commented Aug 22, 2020

Thank you dompas! they worked :-)

@gjdv
Copy link

gjdv commented Jan 18, 2022

I hit some similar behavior and resolved it in pull request #53

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

5 participants