大数据应用与管理2:逻辑回归
作者:互联网
逻辑回归
2.1实验说明
对于给定的数据集《电信客户流失分析.xlsx》,利用SPSS Modeler建立逻辑回归模型进行用户流失的影响因素分析,解释回归结果,写出逻辑回归公式,并对于给定的新用户,计算其流失的可能性。
2.2操作步骤
请附SPSS Modeler所建模型截图以及模型输出结果截图。
模型截图:
模型输出结果截图:
Omnibus Tests of Model Coefficients |
|
||||||||||||
|
Chi-square |
df |
Sig. |
|
|||||||||
Step 7 |
Step |
14.196 |
1 |
.000 |
|
||||||||
Block |
1030.837 |
11 |
.000 |
|
|||||||||
Model |
1030.837 |
11 |
.000 |
|
|||||||||
|
Variables in the Equation |
||||||||||||
|
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
||||||
|
Step 7g |
tenure |
-.062 |
.010 |
39.422 |
1 |
.000 |
.940 |
|||||
|
PhoneService(1) |
-.806 |
.206 |
15.255 |
1 |
.000 |
.446 |
||||||
|
InternetService |
|
|
93.156 |
2 |
.000 |
|
||||||
|
InternetService(1) |
.523 |
.217 |
5.819 |
1 |
.016 |
1.687 |
||||||
|
InternetService(2) |
1.736 |
.222 |
60.888 |
1 |
.000 |
5.675 |
||||||
|
Contract |
|
|
63.437 |
2 |
.000 |
|
||||||
|
Contract(1) |
-.823 |
.164 |
25.104 |
1 |
.000 |
.439 |
||||||
|
Contract(2) |
-2.518 |
.352 |
51.129 |
1 |
.000 |
.081 |
||||||
|
PaperlessBilling(1) |
.396 |
.115 |
11.894 |
1 |
.001 |
1.486 |
||||||
|
PaymentMethod |
|
|
19.300 |
3 |
.000 |
|
||||||
|
PaymentMethod(1) |
-.258 |
.176 |
2.167 |
1 |
.141 |
.772 |
||||||
|
PaymentMethod(2) |
.303 |
.141 |
4.601 |
1 |
.032 |
1.354 |
||||||
|
PaymentMethod(3) |
-.148 |
.179 |
.687 |
1 |
.407 |
.862 |
||||||
|
TotalCharges |
.000 |
.000 |
13.252 |
1 |
.000 |
1.000 |
||||||
|
Constant |
-.540 |
.326 |
2.749 |
1 |
.097 |
.583 |
||||||
2.3结果分析
(1)请结合逻辑回归模型结果中【高级】选项卡中输出的表格信息,对结果进行分析。分析内容包括:数据中各变量信息;模型的显著性检验;模型的拟合优度;模型的准确率;模型中自变量的系数、显著性、OR值(占优比)的解释;模型的logit方程。
答:P值为0.001,小于0.05,该模型有显著性;
模型准确率80.86%;
Logit(P)=-0.54-0.062tenure-0.806PhoneService(1)+0.523InternetService(1)+1.736InternetService(2)-0.823Contract(1)-2.518Contract(2)+0.396PaperlessBilling(1)-0.258PaymentMethod(1)+0.303PaymentMethod(2)-0.148PaymentMethod(3)
(2)请对给定各属性值的用户A,利用logit方程计算其会流失的概率,若以0.5的概率为分界线,请确定该用户是否会流失。注:用户A在各个属性的值如下表:
答:
Logit(P)=-0.916
根据将值带入,得到P=28%。所以该客户流失的可能性为 28%,已经小于 50%,认为不会流失。
标签:逻辑,回归,-.,Contract,000,应用,InternetService,PaymentMethod,模型 来源: https://www.cnblogs.com/joeni/p/15089877.html