-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
scorecard_ply can not convert some variables. #47
Comments
could you give me a sample data to reproduce your issue? If you can use R, please use the r package scorcard, which is much mature. |
Hi m = glm( formula, binnedwoe_sample, family = 'binomial') So when you have a look at the points_train you will see that some variables (v1-v7) will have NA values. I still can't figure out why this is the case. |
Your sample data and code cant be reproduce, since the 'binnedwoe_sample' is missing. You can provide the data in original values, but not in woe values. |
I have attached the original data sample. If you can follow the commands below you can see the the isssue. Many Thanks! bins_var = woebin(train_data, y="GOODBAD",positive = "BAD|1") |
You should use the original data in the scorecard_ply function, but not the woe data frame.
Since your are using the r version package, please open issue in the r package repo next time. |
Hi Shichen
I have the following codes:
my_card <- scorecard(bins, model, points0 = 600, odds0 = 1/38, pdo = 20)
points_train <- scorecard_ply(train.data, my_card, only_total_score = FALSE, print_step = 0) %>% as.data.frame()
The above codes run normally, but when I check new transformed dataframe(points_train )
I see that some of the variables has NA values (like GENDER, MARITAL STATUS). Checking the my_card list I see that there is no problem for these variables, but once I convert them to get scores for trained data(points_train) these variables has NA values. Do you know why it can be?
Have been few days trying to solve it but still cant figure out. Many Thanks!
The text was updated successfully, but these errors were encountered: