# Logistic Regression Package

**URL:** <https://discourse.julialang.org/t/logistic-regression-package/29354>\
**Category:** Machine Learning\
**Tags:** package, proposal\
**Created:** [October 1, 2019, 9:25am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354 "2019-10-01T09:25:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![infinitylabs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/infinitylabs/32/10563_2.png) [@infinitylabs](https://discourse.julialang.org/u/infinitylabs)\
**Post date:** [October 1, 2019, 9:25am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354/1 "2019-10-01T09:25:20Z")

</div>

Hi,  
Has anybody released a package foe logistic and multinomial regressions?

We are planning to release one soon.  
Couldnt find a direct package like that in sklearn.

Has anyone come across any such packages?

---

<div class="post-metadata">

**Author:** ![hossein\_pourbozorg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hossein_pourbozorg/32/7152_2.png) [@hossein\_pourbozorg](https://discourse.julialang.org/u/hossein_pourbozorg)\
**Post date:** [October 1, 2019, 9:50am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354/2 "2019-10-01T09:50:42Z")

</div>

[Github search result](https://github.com/search?q=Logistic+Regression+language%3AJulia)

---

<div class="post-metadata">

**Author:** ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Post date:** [October 1, 2019, 9:53am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354/3 "2019-10-01T09:53:45Z")

</div>

In [https://github.com/mcreel/Econometrics](https://github.com/mcreel/Econometrics) there is code for general purpose maximum likelihood estimation. An example is the file [https://github.com/mcreel/Econometrics/blob/master/Examples/MLE/EstimateLogit.jl](https://github.com/mcreel/Econometrics/blob/master/Examples/MLE/EstimateLogit.jl), which shows how to estimate a logit model. Extending this to multinomial logit would be pretty easy. Here’s what the output of the example looks like:

```julia
julia> include("EstimateLogit.jl")
____________________________________________________________
estimate logit model
MLE Estimation Results Convergence: true
Average Log-L: -0.67243 Observations: 30
Sandwich form covariance estimator

                estimate st. err t-stat p-value
           1 0.40743 0.37948 1.07367 0.29214
           2 -0.07359 0.40602 -0.18126 0.85747

Information Criteria
                   Crit. Crit/n
       CAIC 49.14795 1.63827
        BIC 47.14795 1.57160
        AIC 44.34556 1.47819
____________________________________________________________

```

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [October 1, 2019, 10:10am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354/4 "2019-10-01T10:10:34Z")

</div>

I don’t have a package for it - but I have a super bare-bones logistic regression via SGD in my package.

[https://github.com/caseykneale/ChemometricsTools.jl/blob/375619734d7c45659436ef861f2404c65bf42775/src/ClassificationModels.jl#L197-L201](https://github.com/caseykneale/ChemometricsTools.jl/blob/375619734d7c45659436ef861f2404c65bf42775/src/ClassificationModels.jl#L197-L201)

I’d love to see a more fleshed out implementation.

---

<div class="post-metadata">

**Author:** ![vjd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vjd/32/2644_2.png) [@vjd](https://discourse.julialang.org/u/vjd)\
**Post date:** [October 1, 2019, 10:27am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354/5 "2019-10-01T10:27:11Z")

</div>

[https://juliastats.github.io/GLM.jl/stable/manual/](https://juliastats.github.io/GLM.jl/stable/manual/) ?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [October 1, 2019, 10:45am UTC](https://discourse.julialang.org/t/logistic-regression-package/29354/6 "2019-10-01T10:45:58Z")

</div>

> [@infinitylabs](#):
>
> Has anybody released a package foe logistic and multinomial regressions?

Logistic and multinomial regressions are just models.

If you want to use these models for inference, there are quite a few choices to make (ML or Bayesian, or some other methodology like EM, various choices for regularization, validation eg PPC, …). Depending on these and the data size (1000 or 10^8 observations), or whether you are looking for a generic (GLM) setup, the complexity of implementations can range from simple to very complex.

Making your questions more specific would help.
