信用评分卡 (part 5 of 7)
python信用评分卡(附代码,博主录制)

信用评分卡-逻辑回归
Credit Scorecards – Logistic Regression (part 5 of 7)
A Primer on Logistic Regression – Are you Happy?

Logistic regression for happiness- by Roopam
A few years ago, my wife and I took a couple of weeks’ vacation to England and Scotland. Just before boarding the British Airway’s plane, an air-hostess informed us that we were upgraded to business class. Jolly good! What a wonderful start to the vacation. Once we got onto to the plane, we got another tempting offer for a further upgrade to the first class. However, this time, there was a catch – just one seat was available. Now that is a shame, of course, we could not take this offer. The business class seats were fabulous before the first class offer came – by the way, all free upgrades. This is the situation behavioral economist describe as relativity & anchoring – in plain English comparison. Anchoring or comparison is at the root of pricing strategies in business and also to all the human sorrow. However, eventually the vacation mood took over and we enjoyed the business class thoroughly. Humans are phenomenally good at adjusting to the situation in the end and enjoy it as well. You will find some of the happiest faces with people in the most difficult situations. Here is a quote by Henry Miller “I have no money, no resources, no hopes. I am the happiest man alive”. Human behavior is full of anomaly – full of puzzles. The following is an example to strengthen this thesis.
几年前,我和妻子在英格兰和苏格兰度过了几个星期的假期。就在登上英国航空公司的飞机之前,一名空姐告诉我们,我们已升级为商务舱。快乐!度假真是一个美好的开始。一旦我们登上飞机,我们又获得了另一个诱人的提议,可以进一步升级到头等舱。然而,这一次,有一个问题 - 只有一个座位可用。当然,这是一种耻辱,我们无法接受这个提议。在提供头等舱优惠之前,商务舱座位非常棒 - 顺便说一下,所有免费升级。这是行为经济学家描述为相对论和锚定的情况 - 用简单的英语比较。锚定或比较是企业定价策略的根源,也是所有人类悲伤的根源。然而,最终度假心情接管了,我们彻底享受了商务舱。人类在适应最终情况方面非常擅长并享受它。在最困难的情况下,你会发现一些最快乐的面孔。以下是亨利米勒的一句话:“我没有钱,没有资源,没有希望。我是最幸福的人“。人类的行为充满了异常 - 充满了谜题。以下是加强本论文的一个例子
列侬,麦卡特尼,哈里森和贝斯特是这个星球上最着名的乐队 - 甲壳虫乐队的成员。 好的,我知道你发现了这个错误。 到现在为止,你必须说出正确的名字:John Lennon,Paul McCartney,George Harrison和Ringo Starr,而不是Pete Best。 实际上,Ringo Starr是Pete Best的替代品,Pete Best是甲壳虫乐队的原始常规鼓手。 皮特一定是被摧毁了,看到他的伙伴们在落后的时候冉冉升起。 错了,在Google上搜索他 - 他是所有人中最快乐的披头士乐队。 现在这是违反直觉的,我想我们不知道是什么让我们开心。
正如在前一篇文章中所承诺的那样,在本文中,我将尝试使用逻辑回归来探索幸福 - 这种技术广泛用于记分卡开发。

Source: flicker.com
Lennon, McCartney, Harrison, and Best are the members of the most famous band ever on the planet – the Beatles. Ok, I know you have spotted the error. By now your must have uttered out the right names: John Lennon, Paul McCartney, George Harrison and Ringo Starr not Pete Best. Actually, Ringo Starr was the replacement for Pete Best, the original regular drummer for the Beatles. Pete must have been devastated seeing his partners rising to glory while he was left behind. Wrong, search for him on Google – he is the happiest Beatle of all. Now that is counter intuitive, I guess we do not have a clue what makes us happy.
As promised in a previous article, in this article I will attempt to explore happiness using logistic regression – the technique extensively used in scorecard development.
我是一位彻底的经验主义者 - 支持基于事实的管理。 因此,让我设计一个快速而肮脏的实验*来生成数据来评估幸福感。 我们的想法是确定影响我们整体幸福感的因素/变量。 让我列出一个生活在城市中的工作成年人的代表性因素列表:
Logistic Regression – An Experiment
I am a thorough empiricist – a proponent of fact-based management. Hence, let me design a quick and dirty experiment* to generate data to evaluate happiness. The idea is to identify the factors / variables that influence our overall happiness. Let me present a representative list of factors for a working adult living in a city:

Now, throw in some other factors to the above list such as – random act of kindness or an unplanned visit to a friend. As you could see, the above list can easily be expanded (recall the article on variable selection- article 3). This is a representative list and you will have to create your own to figure out factors that influence your level of happiness.
The second part of the experiment is to collect data. This is like maintaining a diary only this one will be in Microsoft Excel. Every night before sleeping, you could assess your day and fill up numbers in the Spreadsheet along with your overall level of happiness for the day (as shown in the figure below).

*I am calling this a quick and dirty experiment for the following reasons (1) It’s not a well thought out experiment but is created more to illustrate how logistic regression works (2) the observer and the observed are same in this experiment which might create a challenge for objective measurement.
After a couple of years of data collection, you will have enough observations to create a model – a logistic regression model in this case. We are trying to model feeling of happiness (column B) with other columns (C to I) in the above data set. If we plot B on the Y-axis and the additive combination of C to I (we’ll call it Z) on the X-axis it will look something like the plot shown below.

The idea behind logistic regression is to optimize Z in such a way that we get the best possible distinction between happy and sad faces, as achieved in the plot above. This is a curve-fitting problem with sigmoid function (the curve in violet) as the choice of function.
I would recommend using dates of observations (column A) in our model; this might give an interesting influence of seasons on our mood.
逻辑回归背后的想法是以这样的方式优化Z,使得我们在快乐和悲伤面孔之间得到最佳区分,如上图所示。 这是一个曲线拟合问题,其中sigmoid函数(紫色曲线)作为函数的选择。
我建议在我们的模型中使用观察日期(A栏); 这可能会给季节带来有趣的影响。
Applications in Banking and Finance
This is exactly what we do in case of analytical scorecards such as credit scorecards, behavioral scorecards, fraud scorecards or buying propensity models. Just replace happy and sad faces with …
• Good and Bad borrowers
• Fraud and genuine cases
• Buyers and non-buyers
…. for the respective cases and you have the model. If you remember in the previous article (4), I have shown a simple credit scorecard model: Credit Score = Age + Loan to Value Ratio (LTV) + Instalment (EMI) to Income Ratio (IIR)A straightforward transformation of the sigmoid function will help us arrive at the above equation of the line. This is the final link to arrive at the desired scorecard.
Variable Transformation in Credit Scorecards

The Swordsmith – by Roopam
I loved the movie Kill-Bill, both parts. In the first part, I enjoyed when Uma Thurman’s character went to Japan to get a sword from Hattori Hanzō, the legendary swordsmith. After learning about her motive, he agrees to make his finest sword for her. Then Quentin Tarantino, director of the movie, briefly showed the process of making the sword. Hattori Hanzō transformed a regular piece of iron to the fabulous sword – what a craftsman. This is fairly similar to how analysts perform transformation of the sigmoid function to the linear equation. The difference is that analysts use mathematical tools rather than hammers and are not as legendary as Hattori Hanzō.
我喜欢电影Kill-Bill这两部分。 在第一部分中,当Uma Thurman的角色去日本从传说中的剑士HattoriHanzō手中拿剑时,我很享受。 在了解了她的动机之后,他同意为她做出最好的剑。 然后电影导演昆汀·塔伦蒂诺(Quentin Tarantino)简要介绍了制作剑的过程。 HattoriHanzō将一块普通的铁片变成了神话般的剑 - 这真是一个工匠。 这与分析师如何将S形函数转换为线性方程非常相似。 不同之处在于,分析师使用数学工具而不是锤子,并不像HattoriHanzō那样具有传奇色彩。
Reject Inference
Reject inference is a distinguishing aspect about credit or application scorecards which is different from all other classification models. For the application scorecards, the development sample is biased because of the absence of performance for rejected loans. Reject inference is a way to rectify this shortcoming and removing the bias from the sample. We will discuss reject inference in detail in some later article on YOU CANalytics.
拒绝推断是信用或应用记分卡的一个显着方面,它与所有其他分类模型不同。 对于应用记分卡,由于拒绝贷款缺乏绩效,开发样本存在偏差。 拒绝推断是一种纠正这一缺点并消除样本偏差的方法。 我们将在后面有关您的CANalytics的文章中详细讨论拒绝推断。
Sign-off Note
Now that we have our scorecard ready the next task is to validate the predictive power of the scorecard. This is precisely what we will do in the next article. See you soon.

信用评分卡 (part 5 of 7)的更多相关文章
- 信用评分卡(A卡/B卡/C卡)的模型简介及开发流程|干货
https://blog.csdn.net/varyall/article/details/81173326 如今在银行.消费金融公司等各种贷款业务机构,普遍使用信用评分,对客户实行打分制,以期对客户 ...
- 信用评分卡 (part 7 of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- 信用评分卡 (part 6 of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- 信用评分卡 (part 4 of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- 信用评分卡 (part 3of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- 信用评分卡 (part 2of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- 信用评分卡 (part 1 of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- 信用评分卡Credit Scorecards (1-7)
欢迎关注博主主页,学习python视频资源,还有大量免费python经典文章 python风控评分卡建模和风控常识 https://study.163.com/course/introductio ...
- python德国信用评分卡建模(附代码AAA推荐)
欢迎关注博主主页,学习python视频资源,还有大量免费python经典文章 python信用评分卡建模视频系列教程(附代码) 博主录制 https://study.163.com/course/i ...
随机推荐
- gym-101350M
题意:给你一堆货币汇率,再给你一堆货币,算下值多少钱: 思路:直接map搞定: #include<iostream> #include<algorithm> #include& ...
- 微信小程序 canvas 字体自动换行(支持换行符)
微信小程序 canvas 自动适配 自动换行,保存图片分享到朋友圈 https://github.com/richard1015/News 微信IDE演示代码https://developers.w ...
- 洛谷P1622释放囚犯
题目: 这个题很明显是一个区间DP,但是比较不同的是,这个题它很像区间DP的经典题——石子合并. 然后我傻傻的搞了这个题搞了一下午,然后几乎看遍了全网的题解,就只看懂了这个方法,可能是我太菜了吧,但是 ...
- Spring02-注入和注解方式操作
一. 依赖注入 测试类:Person.java 创建配置文件:applicationContext-injection.xml 创建测试代码:InjectionTest.java 1. set方法注入 ...
- Java异步、线程池解决方案
一.ThreadPoolExecutor------线程池 private static final ThreadPoolExecutor threadPoolExecutor = new Threa ...
- hbase系列
jvmhttps://www.cnblogs.com/jiyukai/p/6665199.html hbase https://blog.csdn.net/lizhitao/article/detai ...
- bzoj 2733 : [HNOI2012]永无乡 (线段树合并)
Description 永无乡包含 n 座岛,编号从 1 到 n,每座岛都有自己的独一无二的重要度,按照重要度可 以将这 n 座岛排名,名次用 1 到 n 来表示.某些岛之间由巨大的桥连接,通过桥可以 ...
- python学习日记(python2/3区别补充,is / id/ encode str,bytes)
python2和python3区别 print python2中,print 是语句 :用法 ---->print '***' python3中,print 是函数:用法----->pri ...
- EtherType :以太网类型字段及值
Ethernet II即DIX 2.0:Xerox与DEC.Intel在1982年制定的以太网标准帧格式.Cisco名称为:ARPA Ethernet II类型以太网帧的最小长度为64字节(6+6+2 ...
- nginx php-fpm conf文件编写
coco.conf ##upstream upstream php_coco_backend{ server 127.0.0.1:8019; } server { listen 80; server_ ...