I have a dataframe, with data of several continuous variables. The variables are not independent.

My goal is to sample from the distribution that generated this data.

What's a relatively easy and practical way to do this?

One quick and dirty approach I can think of is to discretize all variables and then sample from the buckets. Is this a decent approach? What's a better one?

A cleaner fix could be to do PCA and do the above approach on the principal components. However this is not ideal in my case due to user needs.

  • $\begingroup$ Why not just sample the rows of the dataframe randomly with replacement? $\endgroup$ – Tim Jun 9 at 13:00
  • $\begingroup$ @Tim thanks, that's a good point. I am however also interested in sampling out of sample points, if possible. It will be great if there's a decent easy method to do this. $\endgroup$ – learning Jun 9 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.