# \#least-squares

**URL:** https://discourse.julialang.org/tag/least-squares/1574.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Should NonlinearLeastSquaresProblem be used for deep learning?](https://discourse.julialang.org/t/should-nonlinearleastsquaresproblem-be-used-for-deep-learning/135793)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 11\
**Last updated:** [February 24, 2026, 4:03pm UTC](https://discourse.julialang.org/t/should-nonlinearleastsquaresproblem-be-used-for-deep-learning/135793 "2026-02-24T16:03:28Z")

</div>

From this JuliaCon talk Fast and Robust Least Squares / Curve Fitting by @ChrisRackauckas, I gathered that if you have a L2 loss function then you should be using NonlinearLeastSquaresProblem from the NonlinearSolve.jl p…

---

## [Solving Optimization of Least Squares Term with Quadratic Term with Memory Infeasible Matrix](https://discourse.julialang.org/t/solving-optimization-of-least-squares-term-with-quadratic-term-with-memory-infeasible-matrix/132599)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 2\
**Last updated:** [September 24, 2025, 2:41pm UTC](https://discourse.julialang.org/t/solving-optimization-of-least-squares-term-with-quadratic-term-with-memory-infeasible-matrix/132599 "2025-09-24T14:41:15Z")

</div>

I want to solve: \\arg \\min\_{\\boldsymbol{x}} \\frac{\\lambda}{2} \\boldsymbol{x}^{T} \\boldsymbol{E}^{T} \\boldsymbol{K} \\boldsymbol{E} \\boldsymbol{x} + \\frac{\\rho}{2} {\\left\\| \\boldsymbol{A} \\boldsymbol{x} - \\boldsymbol{y} …

---

## [Solving a Shifted Linear System of 2 Symmetric Positive Semi Definite (SPSD) Matrices](https://discourse.julialang.org/t/solving-a-shifted-linear-system-of-2-symmetric-positive-semi-definite-spsd-matrices/131636)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 31\
**Last updated:** [August 18, 2025, 6:20pm UTC](https://discourse.julialang.org/t/solving-a-shifted-linear-system-of-2-symmetric-positive-semi-definite-spsd-matrices/131636 "2025-08-18T18:20:18Z")

</div>

I have the following linear system: \\left( \\boldsymbol{A} + \\lambda \\boldsymbol{C} \\right) \\boldsymbol{x} = \\boldsymbol{A}^{T} \\boldsymbol{b} Where \\boldsymbol{A}, \\boldsymbol{C} \\in \\mathcal{S}\_{+}^{n} are Symmetric …

---

## [Least squares with SciML NonlinearSolve.jl - how to?](https://discourse.julialang.org/t/least-squares-with-sciml-nonlinearsolve-jl-how-to/113074)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 13\
**Last updated:** [April 18, 2024, 9:18pm UTC](https://discourse.julialang.org/t/least-squares-with-sciml-nonlinearsolve-jl-how-to/113074 "2024-04-18T21:18:28Z")

</div>

Trying to get how to use it - reading Documentation unfortunately doesn’t help. The use case - a model described by a formula, and a vector of (t, y) value pairs representing e.g. experimental data. Like the example pro…
