-
Notifications
You must be signed in to change notification settings - Fork 0
Numerics for algorithm comparisons #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Renamed files to better represent uses cases - changed solve_metric to save output in timedated folder, and name according to choice of lambda - changed benchemarking to compute over various choices of lamba - began adding plots
Migrating MATLAB from Nicks' .mlx livescript format to .m filetype
Added PDCO_numerics.m and associated output, saved to .csv files *potential issue, meet to discuss diagonal scaling in UEG (d1 in pdco.m)
fixed matlab lambda scaling, and deleted extraneous .csv files
Added comments to matlab files to indicate major changes (piggybacking for tracer) Mistake made with plotting (version control); indicated as TO-DO item
Experimenting with julia OPTIM package to get cost per iteration. TO-DO: clone and piggback optim repo
Replaced julia Optim module with local version, to piggyback tracer and add function and gradient calls per iteration. Previously obfuscated in the line search subroutine
Added a local version of the Optim package to numerics folder. To-do: add cg itns tracker to PDCO and plot results on shared axis |
Added plotting function, tracking cg iterations. PDCO not plotted but results saved (prohibitively high number of iterations)
Added plot_results.jl and saved plots in /output folder, comparing by computational cost (matrix multiplications)
To-do:
|
Why copy the Optim.jl source code instead of just adding it as a package dependency? |
The Optim.jl package didnt have the tracing options we needed! Optim's LBFGS only reports functions/gradient values in its trace, even using extended tracer options. So, ive changed Optim's tracer.jl file to report these per iteration. If there is a cleaner way of replacing the default Optim tracer, please let me know! |
@mattkingros Instead of copying in the entire Optim.jl package, I believe it's possible to modify the particular method after doing "using Optim". For example, here I'm replacing a function inside of a module: julia> module CoolMod
hello()="Hello"
call(x)=hello()
end
Main.CoolMod
julia> CoolMod.call(1)
"Hello"
julia> CoolMod.hello() = "GoodBye"
julia> CoolMod.call(1)
"GoodBye" You should be able to do something analogous for the tracer function you wish to modify. |
@mpf Thanks for the help and MWE! I'll take a look at this approach first thing tomorrow. If it is a simple override like your example, that would be a great fix. |
@mpf A direct overwrite as you suggested is proving to be more difficult than expected. Optim uses private types under-the-hood, and so the associated methods are resistant to being overwritten (and are throwing me a mix of "invalid redefinition of constant" and "type not defined" errors which have been unhelpful in finding a solution). Do you have any time later today/this week for a quick chat to point me in the right direction? |
added try/catch blocks around failure cases (chat with michael re:this) moved plot functions to plot_utils file Initial run with MNIST
TO-DO: discuss rho-meson breakdown and interpret results
Laplace inversion plots replaced with UEG & rho-meson problems for the talk. During meeting with michael.
Code Cleanup and reststucturing - Removing Optim.jl Source from local repo, added as a fork and "using(...)" syntax.
|
Initial pull request during meeting