Comments (5)
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.
from scorecardpy.
Hi
Thanks for your response. I have attached the sample data. I am using R and If you perform the following codes you can see the issue.
m = glm( formula, binnedwoe_sample, family = 'binomial')
my_card <- scorecard(bins_var, m, points0 = 600, odds0 = 1/38, pdo = 20)
points_train <- scorecard_ply(binnedwoe_sample, my_card, only_total_score = FALSE, print_step = 0) %>% as.data.frame()
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.
Many thanks
from scorecardpy.
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.
from scorecardpy.
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")
train_binned <- woebin_ply(train_data, bins_var)
names(train_binned) = gsub(pattern = "_woe", replacement = "", x = names(train_binned))
m3 = glm( GOODBAD~., train_binned, family = 'binomial')
my_card <- scorecard(bins_var, m3, points0 = 600, odds0 = 1/38, pdo = 20)
points_train <- scorecard_ply(train_binned, my_card, only_total_score = FALSE, print_step = 0) %>% as.data.frame()
from scorecardpy.
You should use the original data in the scorecard_ply function, but not the woe data frame.
points_train <- scorecard_ply(train_data, my_card, only_total_score = FALSE, print_step = 0)
Since your are using the r version package, please open issue in the r package repo next time.
from scorecardpy.
Related Issues (20)
- 使用woebin分箱后,缺失值分箱WOE计算错误 HOT 3
- pandas版本的reset_index不支持name了 HOT 5
- woe_ply转换时,不能将缺失值转换成其对应woe HOT 6
- perf_eva() 函数报错问题 HOT 4
- 运行你的example中train_perf = sc.perf_eva(y_train, train_pred, title = "train") HOT 5
- sc.perf_psi HOT 1
- woe分箱问题 HOT 1
- woebin 0 and 1 replacing part
- The latest version 1.9.7 in Pypi HOT 1
- Example has problem of data leakage HOT 1
- 请问在使用woe_bin的时候,如何将missing这一分箱和其它分箱合并 HOT 1
- 系数正负问题 HOT 6
- woebin分箱结果异常 HOT 4
- 两个地方算出来的iv不同 HOT 1
- TypeError: unhashable type: 'numpy.ndarray' HOT 8
- Can we use XGBRegressor? HOT 5
- Default values for pdo, points0 and odds0 HOT 2
- 请问包中具体用的分箱算法是哪一种 HOT 14
- remould this card HOT 2
- 改造评分卡的预测模型 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scorecardpy.