全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2958 8
2013-06-19
本人非统计专业,正在准备数据分析师的考试。刚刚看完两本教材,拿来a00-240的考题想练练手,结果发现自己很多知识都理解的不够扎实到位,错误百出。。。

这道是考卷中的第8题:

Suppose training data are oversampled in the event group to make the number of events and non- events roughly equal. A logistic regression is run and the probabilities are output to a data set NEW and given the variable name PE. A decision rule considered is, "Classify data as an event if probability is greater than 0.5." Also the data set NEW contains a variable TG that indicates whether there is an event (1=Event, 0= No event).
                                                                                                                        [size=10.000000pt]The following SAS program was used:

Data NEW;
    set NEW;
    Solicit = PE > .5;
run;
proc means data=NEW(where = (TG = 1)) mean;
    var Solicit;
run;


[size=10.000000pt]What does this program calculate?                                       
[size=10.000000pt]A. Depth
B. Sensitivity
C. Specificity
D. Positive predictive value                                        
                                
                        
               

[size=10.000000pt]

[size=10.000000pt]

[size=10.000000pt]我知道Depth/Sensi/Spec/PV+这几个Statistics应该怎样求得,但是我现在对于NEW这个data set里面的三个变量(PE,Solicit,TG)理解比较混乱,所以不知道应该怎样往公式里面代入。还请大家帮忙。谢谢啦。













二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-6-19 06:06:17
英语不好啊,看不懂....
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-6-19 22:04:03
我大致翻译一下:
过度采样的训练数据中事件发生的概率近似于0.5。进行logistic回归后的probability作为变量PE被存入新的data set NEW中。NEW中还有一个变量叫TG。TG的value是1或0,分别表示probability大于或小于0.5。接着就是SAS program了。

以下是我结合Confusion Matrix的理解:
rho1=0.5,PE表示Predicted Value,那么Solicit就是Predicted Positive,TG是Actual Positive。
这里求的是Mean(Solicit)given Actual Postive。不知道我这样理解对不对。。。
但是我不明白怎么就从Mean(Solicit)given Actual Postive=True Positive/Actual Positive=Sentivity了。。。


PS:
Confusion Matrix:
Actual\Predict             0(Predicted Negative) |  1(Predicted Positive)
0(Actual Negative)                 True Negative  |  False Positive
1(Actual Positive)                  False Negative  |  True Positive
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-6-20 15:06:25
PE是从模型预测出来的,这个事件(每一个观测)发生的概率;
Solicit你可以理解为(每一个观测)被认为是预测发生了(发生了Solicit=1),这就是“Predicted Positive”;
TG是(每一个观测)实际是否发生(发生了TG=1),这就是“Actual Positive”;

灵敏度(Sensitivity)=(Ture positives)/(total actually positive)=最后那个proc means运行出来的结果。

具体看看<Predictive Modeling Using Logistic Regression>的4-33,多看几遍就明白了。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-6-21 01:56:30
Kalet 发表于 2013-6-20 15:06
PE是从模型预测出来的,这个事件(每一个观测)发生的概率;
Solicit你可以理解为(每一个观测)被认为是预 ...
谢谢你呀,可我还是不太理解proc means运行的结果是如何等于TP/AP的,可不可以解释一下?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-6-21 05:21:52

& T

proc means data=NEW(where = (TG = 1)) mean;
    var Solicit;
run;
{TG =1} is to select those with observed event (regard it as true). {Solicit=1} are those scored (tested) as an event and {solicit =0} as a non-event. So here the mean == #{solicit=1 & TG=1}/#{TG=1}, which is defined by sensitivity: if it is an event, how likely we can test it as an event. In medical field, that is an upmost important indicator for a test. We cannot afford any chance of missing a sick person (having event). Just for my curiosity, what is depth?
Jingju
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群