BookmarkSubscribeRSS Feed
Kanyange
Fluorite | Level 6

Hi All,

I have never used boosting sampling, please see the code below! Could anyone explain what this code does and what's the objective of the boosting technique?

I started with train_pot that has a target1=4 and target0=34 and I end up with a  train_final that has  target1=34 and target0=34 (50:50).

Your help would be much appreciated.

Many Thanks

/* Boost the training file to have a 50:50 target1 vs target0 */    

proc surveyselect data=train_pot

     out=train_pot

     method=urs

     sampsize=&max_cust.

     seed=0;

strata target;   

run;    

         

proc freq data=train_pot.;    

table target*numberhits /out=check_boost;   

run;    

    

    

data train_final;    

set train_pot.;   

do i = 1 to numberhits;   

  output;  

end;   

run;   

3 REPLIES 3
stat_sas
Ammonite | Level 13

Hi,

What is the desired output you are looking for as a result of boosting sampling?

Kanyange
Fluorite | Level 6

I would like to Boost the training file to have a 50:50 target1 vs target0.....

Thank You..


stat_sas
Ammonite | Level 13

Sorry for late reply,objective is to over sample a rear event in the model development data but using method above you may have multiple same observations in train_final data for target=1 right?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1313 views
  • 0 likes
  • 2 in conversation