How would you explain the difference between the new LearnDistribution function and the FindDistribution function? or perhaps the overall ML vs Find framework.
I would think for a sample size of 1000 the following code would produce a consistent histogram. But that isn't the case... why is that?
obj = RandomReal[100, 1000];
ld = LearnDistribution@obj
fd = FindDistribution@obj
obj2 = Table[RandomVariate /@ {ld, fd}, 100];
Histogram[obj2[[;; , 1]], PlotRange -> All]
Histogram[obj2[[;; , 2]], PlotRange -> All]```
LearnDistribution
seems to end up with aSmoothKernelDistribution
which seems to have too small of a default bandwidth resulting in a bumpier distribution, and (3) Because you've chosen a bounded distribution, the default forSmoothKernelDistribution
doesn't use the"Bounded"
option, and (4)LearnedDistribution
is experimental: your mileage may vary. $\endgroup$PDF
's of the estimated distributions. There's no need to generate histograms: 'Plot[{PDF[ld, x], PDF[fd, x]}, {x, -20, 120}]`. $\endgroup$