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

new stepsize rule adaPG(pi,r) #31

Merged
merged 1 commit into from
Jan 18, 2024
Merged

new stepsize rule adaPG(pi,r) #31

merged 1 commit into from
Jan 18, 2024

Conversation

pylat
Copy link
Owner

@pylat pylat commented Dec 1, 2023

I have added a new stepsize rule according to AdaPG method presented in https://arxiv.org/pdf/2311.18431.pdf

end

function OurRulePlus(; gamma = 0, nu = 1, xi = 1, r = 1/2)
_gamma = if gamma > 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also avoid introducing _gamma and just do

if gamma <= 0
    error(…)
end

no?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. This stepsize rule is fed into the PD algorithm. That is why I kept the same style as we had for OurRule. Only sigma is changed to gamma because we should first check how exactly the stepsize rule looks like there.

r::R
end

function OurRulePlus(; gamma = 0, nu = 1, xi = 1, r = 1/2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use the default gamma = 0? I guess it’s required positive to initialize the stepsize sequence, so you can also not give it a default

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we keep it in the same style as OurRule (to be updated with added sigma for the primal-dual version), or shall I remove gamma already?


function stepsize(rule::OurRulePlus)
gamma = rule.gamma
return (gamma, gamma), (gamma, gamma)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the convention we used elsewhere is for the second stepsize returned to be the dual stepsize (after fixing the ratio between the two). So here the ratio is just 1 right?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then again this is because in the near future we should add the primal-dual stepsize version with first (gamma, gamma) transforming into (gamma, sigma).

@@ -272,6 +272,43 @@ function stepsize(rule::OurRule, (gamma1, gamma0), x1, grad_x1, x0, grad_x0)
return (gamma, sigma), (gamma, gamma1)
end



struct OurRulePlus{R}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, we really need to improve the naming convention 😅

Should we just use “author initials + year + rule” all over the module?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a separate PR though, I can do that

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it is a mess. The name OurRulePlus is terrible indeed. Your suggestion sounds like a great idea.

@lostella lostella merged commit 2eb4059 into main Jan 18, 2024
6 checks passed
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