BookmarkSubscribeRSS Feed
kokodenden52
Obsidian | Level 7

下記にターゲットが極端に少ない場合のモデルの構築方法として、オーバーサンプリングが紹介されています。

 

下記ではEnterpriseMinerによるやり方が紹介されていますが、

プログラムでできないでしょうか?

 

https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/em003.html

 

 

お手数ですが、ご教示お願いいたします。

2 REPLIES 2
yu_sas
SAS Employee

こんにちは。

 

SURVEYSELECTプロシジャを利用することが一案かと思われます。この場合、度数はあらかじめFREQプロシジャなどで算出しておき、指定することになります。

 

 

data test;
do i=1 to 570;
 event=0;
 output;
end;
do i=1 to 30;
 event=1;
 output;
end;
run;

proc freq data=test;
tables event;
run;

proc sort data=test;
by event;
run;

proc surveyselect data=test out=sample method=srs sampsize=30 noprint;
  strata event;
run; 

proc freq data=sample;
tables event;
run;

 

サンプリング後の調整については以下が参考になると思います。

 

 

Usage Note 22601: Adjusting for oversampling the event level in a binary logistic model

https://support.sas.com/kb/22/601.html

kokodenden52
Obsidian | Level 7

詳しくご回答いただき、ありがとうございます。

 

一度試してみます。

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Discussion stats
  • 2 replies
  • 1167 views
  • 2 likes
  • 2 in conversation