Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Adjust the distribution of a feature with sampling?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Adjust the distribution of a feature with sampling?

So I intend to build a predictive model.I have a large data set with 10 features and 1 interval target. One of those features is numeric ranging from 1 to 900. I know that due to some underlying changes in the population, records from about 1 to 250 are underrepresented in my sample, and 251+ are over represented. I approximately know what the distribution of this feature should look like.  Is there a way I can easily sample from dataset with replacement so that the distribution of this feature matches percentages I give it?

Thanks.


Accepted Solutions
Solution
‎03-06-2015 06:17 PM
Super User
Posts: 11,343

Re: Adjust the distribution of a feature with sampling?

One way would be to add a strata variable based on whether the value is over/under the given break point. I don't know if EM has a direct sampling tool but Proc surveyselect allows setting a sample rate per strata.

View solution in original post


All Replies
Solution
‎03-06-2015 06:17 PM
Super User
Posts: 11,343

Re: Adjust the distribution of a feature with sampling?

One way would be to add a strata variable based on whether the value is over/under the given break point. I don't know if EM has a direct sampling tool but Proc surveyselect allows setting a sample rate per strata.

Occasional Contributor
Posts: 8

Re: Adjust the distribution of a feature with sampling?

I ended up breaking my data into several segments depending and the value of my numeric feature, and used proc surveyselect to sample with replacement form the individual pieces until the overall distribution of my data looked as I expected it to. Thanks!

Super Contributor
Posts: 337

Re: Adjust the distribution of a feature with sampling?

Hi Jon,

A way to do it directly in EM:

On your Data Partition node, click on the Variables ellipsis (...). On the menu you can specify a Partition Role as Stratification.

e.g.

Home Equity IDS->Partition (change Partition Role of 'Reason' from Default to Stratification)

forsascomm4.png

I hope this helps,

Miguel

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 303 views
  • 3 likes
  • 3 in conversation