Skip to content
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

Allow scaled versions of Static #68

Merged
merged 1 commit into from
Oct 30, 2017
Merged

Allow scaled versions of Static #68

merged 1 commit into from
Oct 30, 2017

Conversation

anriseth
Copy link
Collaborator

For the Static linesearch, I have use cases where it is useful to have a step size that is static, relative to the direction norm.

@codecov
Copy link

codecov bot commented Oct 30, 2017

Codecov Report

Merging #68 into master will increase coverage by 0.28%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #68      +/-   ##
=========================================
+ Coverage   61.62%   61.9%   +0.28%     
=========================================
  Files           7       7              
  Lines         542     546       +4     
=========================================
+ Hits          334     338       +4     
  Misses        208     208
Impacted Files Coverage Δ
src/static.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6833243...d649616. Read the comment docs.

@anriseth anriseth merged commit 5b5992f into master Oct 30, 2017
@anriseth anriseth deleted the scaled branch October 30, 2017 16:16
@pkofod
Copy link
Member

pkofod commented Apr 4, 2018

@anriseth is it really necessary to do the s check? It makes it kind of hard to remove s as an input :)

@anriseth
Copy link
Collaborator Author

anriseth commented Apr 4, 2018

I'm not sure what you mean by the s check?

In any case, I realize this causes some issues with the univariatization. Here's one approach that may let us still keep the scaled approach:

  • Redo Static to take step length provided by ls(..., alpha,...), and remove Static.alpha.
  • Introduce InitialStatic.scaled instead, and let that provide the initial alpha = min(is.alpha, ns) / ns

@pkofod
Copy link
Member

pkofod commented Apr 5, 2018

Yes, that's a good approach, I'll implement it! By s check I mean the check if vecnorm(s) is positive.

@pkofod
Copy link
Member

pkofod commented Apr 5, 2018

Introduce InitialStatic.scaled instead, and let that provide the initial alpha = min(is.alpha, ns) / ns

Uhm... lol.. seems like it is already in InitialStatic, so basically this is done twice...

https://github.com/JuliaNLSolvers/LineSearches.jl/blob/master/src/static.jl#L29
https://github.com/JuliaNLSolvers/LineSearches.jl/blob/master/src/initialguess.jl#L17

@anriseth
Copy link
Collaborator Author

anriseth commented Apr 5, 2018

Uhm... lol.. seems like it is already in InitialStatic, so basically this is done twice...

Hehe, very foresighted of me 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants