# Solve Regularized Nonlinear Least Squares

**URL:** https://discourse.julialang.org/t/solve-regularized-nonlinear-least-squares/129608
**Category:** Optimization (Mathematical)
**Tags:** optimization
**Created:** [June 3, 2025, 5:34pm UTC](https://discourse.julialang.org/t/solve-regularized-nonlinear-least-squares/129608 "2025-06-03T17:34:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fdekerme](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fdekerme/32/43574_2.png) [@fdekerme](https://discourse.julialang.org/u/fdekerme)
#### Post date: [June 3, 2025, 5:34pm UTC](https://discourse.julialang.org/t/solve-regularized-nonlinear-least-squares/129608/1 "2025-06-03T17:34:56Z")

</div>

Hi everyone 😀,

I want to solve a large Regularized Nonlinear Least Squares problem

min \text{Cost} \left(T^{1}, T^{2}\right) = \|r\|^2 + R(T^{1}, T^{2})

where r log-sum-exponential terms:

r^{i}(T^{1}, T^{2}) = \log \left(\sum\_K K \exp \left(-T^{1} v\_K^{1} - T^{2} v\_K^{2} \right) \right) - \log \left(Y^{i}\right)

and R(T^{1}, T^{2}) a (user defined) regularization, such as a [Huber loss](https://en.wikipedia.org/wiki/Huber_loss).

Is it possible to solve this Regularized Nonlinear Least Squares problem with Nonlinear Least Squares solvers/interfaces such as

- [NonlinearSolve.jl](https://docs.sciml.ai/NonlinearSolve/stable/solvers/nonlinear_least_squares_solvers/) from [SciML](https://sciml.ai/)
- CaNNOLeS.jl or JSOSolvers.jl from [JuliaSmoothOptimizers](https://github.com/JuliaSmoothOptimizers)
- [LeastSquaresOptim.jl](https://github.com/matthieugomez/LeastSquaresOptim.jl)
- [NLLSsolver.jl](https://github.com/ojwoodford/NLLSsolver.jl)
- Enlsip.jl
- others ?

Or is it mandatory to use more general optimization (Optimization.jl) to solve it?

Thanks!  
fdekerm

---

<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 3, 2025, 10:01pm UTC](https://discourse.julialang.org/t/solve-regularized-nonlinear-least-squares/129608/2 "2025-06-03T22:01:20Z")

</div>

It’s possible, there are methods to do this, but I don’t know of any software that does it right now…
