francescoalemanno / fixedpoint.jl Goto Github PK
View Code? Open in Web Editor NEWFixed Point Method to solve equations for Julia
License: MIT License
Fixed Point Method to solve equations for Julia
License: MIT License
@JuliaRegistrator register
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!
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).
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.