Giter Club home page Giter Club logo

fixedpoint.jl's People

Contributors

francescoalemanno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fixedpoint.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Clarification of meaning of parameter 'tol'

Hi! Thanks for sharing this package, it's simple and effective!
I want to signal that the definition of tol as given in the readme is a bit misleading. The readme says

tol : absolute tolerance on |f(x)-x|

suggesting (at least to me) that if the algorithm converges (i.e. ends up using strictly less runs than the provided number of iters) the following inequality will always hold:

res = afps(f, x)
grad_norm( f( res.x ) - res.x ) < tol

This seems to be not always true.
The reason is that the update step is computed as

trial = x_n + β * v_n
g = f(trial) - trial
v_n = β * v_n + ϵ * g
x_n = x_n + v_n
runs += 1
if grad_norm(g) < tol
     break
end

and one sees that even if the iteration stops when grad_norm(f(trial) - trial) < tol, it is not x = trial that is returned, but x = trial + ϵ * g.

It may be that the current behaviour is the desired one, I just wanted to signal this in case it is not.

A modification of the update step satisfying the inequality above is

trial = x_n + β * v_n
g = f(trial) - trial
if grad_norm(g) < tol
    x_n = trial
    break
end
v_n = β * v_n + ϵ * g
x_n = x_n + v_n
runs += 1

(requiring also the initialisation runs = 1 I think).

support implace vector functions?

hi, i saw your discourse post and then the repository and im really like it. On our package, we had to add a fixed point solver (just with damping) to solve some thermo problems: , but i would be glad to depend on an external package instead, specially if it provides convergence advantages over simple and damped fixed point iterations.

While the vector solver provided in this package is fine, it allocates a vector on each call. this will quickly becomes the main bottleneck. one idea is to provide an "implace" version of afps, afps! that accepts a function f!(out,x). then the function calls just overwrite a buffer vector instead of creating a new one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.