Coder Social home page Coder Social logo

information's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

information's Issues

WOE signage in calculation

Hi there

Thanks for your Information package.

I have been using the create_infotables and plot_infotables function but I was wondering about the sign of the WOE value. Using the German credit data, variable checkingstatus1 level A11 for example, I manually calculate the WOE as -0.818 whereas it is calculated as 0.818 in create_infotables function. As such the plot_infotables plots the positive 0.818. My calculation of the IV is the same ie 0.206.

See below my example:

Load german credit data

url <- ("http://www.biz.uiowa.edu/faculty/jledolter/DataMining/germancredit.csv")
creditdata <- readr::read_csv(url)

Use the CrossTable function from gmodels package on default and checkingstatus1

gmodels::CrossTable(creditdata$Default,
creditdata$checkingstatus1, prop.r= TRUE, prop.c =FALSE, prop.t=FALSE,
chisq = TRUE)

Manually calculate WOE for A11

percentgood <- 0.1985714
percentbad <- 0.45
odds <- percentgood/percentbad
woe <- log(odds)

Create a WOE table with IV values

IV <- create_infotables(data=creditdata,
y="default")
plot_infotables(IV,"checkingstatus1", show_values=TRUE)

Factor columns in WOE/IV calculation

Hi,

Just wondering if the WOE & IV handles factor columns differently than if they were some type of integer column/id? I have seen some different variable outcomes when using create_infotables()
when having my character columns converted to factors versus when I convert them to numeric id's.

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.