# Julia for Education: Package Selection

**URL:** <https://discourse.julialang.org/t/julia-for-education-package-selection/82852>\
**Category:** Community\
**Created:** [June 16, 2022, 3:08am UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852 "2022-06-16T03:08:13Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 19, 2022, 10:51pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/21 "2022-06-19T22:51:17Z")

</div>

LsqFit.jl usually has a lot of instability issues. For curve fitting I’d just use an optimizer directly.

---

<div class="post-metadata">

**Author:** ![cocoa1231](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cocoa1231/32/22215_2.png) [@cocoa1231](https://discourse.julialang.org/u/cocoa1231)\
**Post date:** [June 19, 2022, 10:54pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/22 "2022-06-19T22:54:17Z")

</div>

Ah, I don’t think I know how to do that. I’ll try to figure it out, or I can also maybe use `SciPy.jl`?

---

<div class="post-metadata">

**Author:** ![garrek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/garrek/32/27937_2.png) [@garrek](https://discourse.julialang.org/u/garrek)\
**Post date:** [June 20, 2022, 2:25am UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/23 "2022-06-20T02:25:08Z")

</div>

This has been my question for a while. It would be nice to have a simple package for least squares and/or curve fitting for those who are just doing basic curve fits. I’ve been very slowly gradually building a wrapper for Optimization.jl to reduce some boilerplate code (and I think SciPy’s `optimize.curve_fit` is a wrapper for `optimize.least_squares`, which is where I’m coming from)

---

<div class="post-metadata">

**Author:** ![cocoa1231](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cocoa1231/32/22215_2.png) [@cocoa1231](https://discourse.julialang.org/u/cocoa1231)\
**Post date:** [June 20, 2022, 5:21am UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/24 "2022-06-20T05:21:24Z")

</div>

I don’t have the knowledge to make such a package (yet at least) but it would be immensely useful if it were there. At the moment `PyCall.jl` has a bug where you have to wrap your model function in a python lambda function as outlined [here on issue 367](https://github.com/JuliaPy/PyCall.jl/issues/367), which is fine for me but I can’t really recommend my peers use Julia when I can’t give them a library to do curve fitting that just works because we use it in undergrad labs all the time. Absolutely love all the wonderful work that has been done in the Julia ecosystem, just wanted to put this out as a request for a feature if possible.

---

<div class="post-metadata">

**Author:** ![runjaj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/runjaj/32/23628_2.png) [@runjaj](https://discourse.julialang.org/u/runjaj)\
**Post date:** [June 20, 2022, 12:07pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/25 "2022-06-20T12:07:49Z")

</div>

> [@garrek](#):
>
> It would be nice to have a simple package for least squares and/or curve fitting for those who are just doing basic curve fits.

I have used this package: [EasyFit.jl](https://github.com/m3g/EasyFit.jl):

---

<div class="post-metadata">

**Author:** ![garrek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/garrek/32/27937_2.png) [@garrek](https://discourse.julialang.org/u/garrek)\
**Post date:** [June 20, 2022, 12:53pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/26 "2022-06-20T12:53:23Z")

</div>

This is just a wrapper for LsqFit.jl, which, as @ChrisRackauckas mentioned, has instabilities.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 20, 2022, 12:55pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/27 "2022-06-20T12:55:10Z")

</div>

Yeah exactly. When we were putting together the curve fit in DataInterpolations, there were a lot of cases failing so we switched from LsqFit.jl to Optim.jl and they started succeeding. So 🤷 I’d double check if that’s still the case but it was a pretty clear trend at least in like 2020.

---

<div class="post-metadata">

**Author:** ![cocoa1231](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cocoa1231/32/22215_2.png) [@cocoa1231](https://discourse.julialang.org/u/cocoa1231)\
**Post date:** [June 20, 2022, 1:22pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/28 "2022-06-20T13:22:43Z")

</div>

Does Optim.jl have a method to get standard errors of the optimized parameters? I couldn’t find something like that [here](https://julianlsolvers.github.io/Optim.jl/stable/#user/tipsandtricks/). Maybe I’m just looking at the wrong place.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 20, 2022, 2:59pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/29 "2022-06-20T14:59:11Z")

</div>

> [@scheidan1](#):
>
> This table is great, thanks!  
> Having this at the beginning of the landing page of the SciML documentation would be helpful. Maybe indicated which packages are part of the SciML ecosystem.
> 
> The current overview under “Domains of SciML” is already a bit too detailed to start with.

Updated:

 ![Screenshot 2022-06-20 105626](https://global.discourse-cdn.com/julialang/original/3X/7/6/7687bc226aba7c6d24303fcbba8652104cda7644.png)

---

<div class="post-metadata">

**Author:** ![ranocha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ranocha/32/35588_2.png) [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Post date:** [June 20, 2022, 4:46pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/30 "2022-06-20T16:46:01Z")

</div>

[Trixi.jl](https://github.com/trixi-framework/Trixi.jl) does not concentrate on finite volume methods but (mostly) on discontinuous Galerkin methods (which are arguably a merge of finite volumes and finite elements).

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 20, 2022, 4:48pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/31 "2022-06-20T16:48:31Z")

</div>

Yeah, probably a bit over simplified. It should be discontinuous Galerkin. BTW, we’ll be doing WENO in MethodOfLines.jl, so it’ll be nice to test these out against each other (once the Symbolic IR form of MTK is completed for scaling).

---

<div class="post-metadata">

**Author:** ![ranocha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ranocha/32/35588_2.png) [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Post date:** [June 20, 2022, 4:55pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/32 "2022-06-20T16:55:09Z")

</div>

Cool 👍 Let me know when you’re ready, I would like to take a look (and assist in setting up nice test cases).

---

<div class="post-metadata">

**Author:** ![wc4wc4wc4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wc4wc4wc4/32/23038_2.png) [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Post date:** [June 20, 2022, 5:24pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/33 "2022-06-20T17:24:43Z")

</div>

You’re almost there: [Optim.jl](https://julianlsolvers.github.io/Optim.jl/stable/#examples/generated/maxlikenlm/).

---

<div class="post-metadata">

**Author:** ![scheidan1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scheidan1/32/24771_2.png) [@scheidan1](https://discourse.julialang.org/u/scheidan1)\
**Post date:** [June 21, 2022, 9:11am UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/34 "2022-06-21T09:11:47Z")

</div>

That’s very neat!  
A little nitpicking: I would describe Turing.jl as “Bayesian Modeling”. When I read “Bayesian Inference” I think more about inference algorithms.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 21, 2022, 9:28am UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/35 "2022-06-21T09:28:30Z")

</div>

Thanks, those changes will be in the next doc build.

---

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [June 21, 2022, 2:25pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/36 "2022-06-21T14:25:02Z")

</div>

I suggest that the list of curated packages based on the discussions be updated in the top-most post, to make it easy for educators and students to select packages that are best suited for their applications. This is not intended to promote / recommend certain packages over the others, but to help users select the packages that are most complete / have most bugs fixed.

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://discourse.julialang.org/u/patrick)\
**Post date:** [June 21, 2022, 2:58pm UTC](https://discourse.julialang.org/t/julia-for-education-package-selection/82852/37 "2022-06-21T14:58:36Z")

</div>

Good idea. I just did it.

[Previous page](https://discourse.julialang.org/t/julia-for-education-package-selection/82852.md?page=1)
