Giter Site home page Giter Site logo

Comments (5)

ShichenXie avatar ShichenXie commented on August 12, 2024

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.

ilkinhuseyn avatar ilkinhuseyn commented on August 12, 2024

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

binnedwoe_sample.txt

from scorecardpy.

ShichenXie avatar ShichenXie commented on August 12, 2024

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.

ilkinhuseyn avatar ilkinhuseyn commented on August 12, 2024

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()

train_data.txt

from scorecardpy.

ShichenXie avatar ShichenXie commented on August 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.