[ANN] MultinomialRegression.jl

Hi all,

Announcing MultinomialRegression.jl, suitable for response variables with 2 or more categories. The small API is demonstrated in the README.

Feedback always welcome.
Happy coding!

4 Likes

Nice work & release (and good discussion GitHub a while back)! just a note to others that MLJLinearModels also offers multinomial classification with various regularisations though from an ML perspective (whereas your package seems more on the stats perspective, similar to GLM.jl and offering things like scores etc).

GLM and MLJLinearModels both have an interface to MLJ and can be accessed through it, maybe that you could be interested in writing an interface to MLJ as well so people can use your package within that environment?

technical notes

if I’m not mistaken you’re using LBFGS for this right? did you experience any issues with the L1 case where, in theory, you shouldn’t be using that solver? (I didn’t)
Also I think it should be relatively easy to add the elnet penalty to your package given you already support l1/l2.

2 Likes

Indeed this package offers some traditional statistical diagnostics such as standard errors.

But it’s also accessible to MLJ.jl via fit(y, X, yname, ylevels, xnames, reg, opts), which is called by fit(formula, data, reg, opts). I’ve filed an issue to implement an MLJ interface, and an issue to implement the elastic net regularizer.

Yeah I’m using LFBGS for these models and haven’t had any issues with convergence.

Cheers

2 Likes

Version 0.3.2 released.

New features are:

  1. Weighted regression
  2. Elastic Net regularization.

See the README for examples of the full API.

1 Like

Version 0.3.3 released.

  • Approximately 15x performance improvement for unregularized models, which now use a Newton-based method instead of the LBFGS solver.

No breaking changes.

3 Likes

Version 0.3.5 released.

  • predict!(probs, model, xnew) for pre-allocated probs.
  • The Coordinate Descent algorithm now includes a line search.
  • Improved options handling, including sensible default options for each solver (:LBFGS, :CoordinateDescent)
  • Updated deps