2
$\begingroup$

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]```


$\endgroup$
2
  • 1
    $\begingroup$ There are (at least) four issues: (1) One shouldn't expect very similar histograms even sampling from the same distribution with just a 100 samples - and those two samples are completely independent of each other. (2) LearnDistribution seems to end up with a SmoothKernelDistribution 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 for SmoothKernelDistribution doesn't use the "Bounded" option, and (4) LearnedDistribution is experimental: your mileage may vary. $\endgroup$
    – JimB
    Commented Jul 6, 2019 at 4:15
  • $\begingroup$ Also the difference shows up from the PDF's of the estimated distributions. There's no need to generate histograms: 'Plot[{PDF[ld, x], PDF[fd, x]}, {x, -20, 120}]`. $\endgroup$
    – JimB
    Commented Jul 6, 2019 at 4:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.