0

I have some points in pytorch and I would like to sample from a distribution that resembles these points. I noticed that the seaborn kde plots seem to draw out/define a distribution graphically and I was wondering if there was a way to do something similar for sampling purposes. In other words I would like to feed my points into a function that uses them to define/approximate a distribution from which I can sample more points. Is this a feasible thing and if so are there any good functions/packages that could be recommended for this?

nighthawk
  • 45
  • 2
  • Have you tried using the [`KernelDensity`](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KernelDensity.html) class from `scitkit-learn`? It should allow you to estimate the probability density function based on your data and then sample from the distribution. – Oxbowerce Mar 14 '22 at 13:31
  • Thank you so much! I will have to read up on this more! – nighthawk Mar 14 '22 at 17:41

0 Answers0