# ISTA e FISTA

**URL:** <https://discourse.julialang.org/t/ista-e-fista/80498>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 4, 2022, 6:36pm UTC](https://discourse.julialang.org/t/ista-e-fista/80498 "2022-05-04T18:36:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DOUGLAS\_NASCIMENTO\_R](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/douglas_nascimento_r/32/32961_2.png) [@DOUGLAS\_NASCIMENTO\_R](https://discourse.julialang.org/u/DOUGLAS_NASCIMENTO_R)\
**Post date:** [May 4, 2022, 6:36pm UTC](https://discourse.julialang.org/t/ista-e-fista/80498/1 "2022-05-04T18:36:15Z")

</div>

I’m trying to implement ISTA and FISTA methods in Julia.  
Theoretically, the efficiency of FISTA is superior to that of ISTA.  
However in the computational results, I am getting that the complexity per iteration of ISTA is the same as that of FISTA. I don’t know if the problem is with Julia.  
Please, could someone help me?

---

<div class="post-metadata">

**Author:** ![moeddel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/moeddel/32/18641_2.png) [@moeddel](https://discourse.julialang.org/u/moeddel)\
**Post date:** [May 4, 2022, 6:44pm UTC](https://discourse.julialang.org/t/ista-e-fista/80498/2 "2022-05-04T18:44:25Z")

</div>

If you are looking for this kind of algorithm, you could try out the [RegularizedLeastSquares](https://github.com/tknopp/RegularizedLeastSquares.jl) package as this seems, what you are looking for.

It has a implementation of FISTA.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 4, 2022, 6:46pm UTC](https://discourse.julialang.org/t/ista-e-fista/80498/3 "2022-05-04T18:46:46Z")

</div>

> [@DOUGLAS\_NASCIMENTO\_R](#):
>
> I am getting that the complexity per iteration of ISTA is the same as that of FISTA

This seems like the wrong metric. Isn’t the point of FISTA that it is supposed to be faster converging than ISTA (that is, fewer iterations), while its cost _per_ iteration is similar?

Note that there are several implementations of FISTA and similar algorithms in Julia, e.g. in [SparseRegression.jl](https://github.com/joshday/SparseRegression.jl) or [LASSO.jl](https://github.com/JuliaStats/Lasso.jl). A compact matrix-free Julia implementation of FISTA can also be found [here](https://github.com/gaurav-arya/ImplicitAdjoints.jl/blob/a5eb6b45f6bba68225945fec7b08727107c57a0a/src/fista.jl). I would try one or more of these out in a benchmark comparison to your code, since people’s first Julia code is typically slow (until they [digest the performance tips](https://docs.julialang.org/en/v1/manual/performance-tips/)).

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [May 4, 2022, 7:11pm UTC](https://discourse.julialang.org/t/ista-e-fista/80498/4 "2022-05-04T19:11:00Z")

</div>

[MLJLinearModels.jl](https://github.com/JuliaAI/MLJLinearModels.jl) has also an implementation of these methods.
