[ANN] ExpectationMaximization.jl - Generic EM algo to fit_mle MixtureModels

I am happy to announce the package ExpectationMaximization.jl.

The purpose is to implement in a very generic “Julia way” EM algorithm to find the maximum likelihood estimator (fit_mle) for MixtureModels i.e. mixture of distributions.

I basically just had to write the pseudocode of the algorithm and rely on the Distributions.jl package that implements the fit_mle(::Type{Distributions}, y[, w]) estimator I need.

The result is a package able to fit all mixture of distributions covered by Distributions.jl. This is different from other R, Python packages where the distributions available are the one hand-coded by the package manager (“Top-Down” approach).

I also added a few fit_mle methods (like for product distributions), which I plan to add directly in Distributions.jl soon.

For example, you can do:

I did benchmark, it is Julia fast, meaning that it beats other Python (like Scikit-Learn), R existing packages (most are specialized for Normal distribution) with my basic Julia knowledge.

(However, I am always happy to speed up).

I did docs with examples.

The last point is the that I use a slightly different convention than the Distribution.jl package, as I use the instance version of fit_mle(D::Distribution, y) and not fit_mle(Type{D}, y). This is discussed in several places, like in the docs or in this PR#1670.


Very nice addition to the stats toolkit! :tada: :julia: