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

Made gradient descent set its learning rate as min(sigma0) #1458

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

MichaelClerx
Copy link
Member

Updated its tests to ignore boundaries. Updated its docstring to make clear that it does this.

…ts tests to ignore boundaries. Updated its docstring to make clear that it does this.
@MichaelClerx
Copy link
Member Author

Again now a new one @DavAug ! But did notice some things while copying its tests

@MichaelClerx MichaelClerx marked this pull request as ready for review August 16, 2022 12:54
@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #1458 (03aa6c7) into master (94d975a) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1458   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           95        95           
  Lines         9300      9300           
=========================================
  Hits          9300      9300           
Impacted Files Coverage Δ
pints/_optimisers/_gradient_descent.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@DavAug DavAug left a comment

Choose a reason for hiding this comment

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

Thanks @MichaelClerx I am happy with the changes. I am just wondering whether it makes sense to link the learning rate to sigma0. Don't we use sigma0 to randomise the initial seeding of the optimiser which is not really related to the learning rate? So, it might be cleaner to simply separate sigma0 and the learning rate, eta, entirely and introduce eta as an input parameter to the method with a default value?

@MichaelClerx
Copy link
Member Author

Thanks @DavAug
We can't really have default values other than x0 and sigma0, because the controller is responsible for creating the optimisers most of the time. The users can already set the learning rate via the controller (.optimiser().set_learning_rate()) & i think that's the best we can do

Regarding the link to sigma0. It's used by stochastic optimisers as a "standard deviation", which tells you about the "scale" of the parameters i.e. the sensitivity of the error/logpdf w.r.t. those parameters (at x0). In this (deterministic) method the learning rate is related to that scale, so it made sense to me to set a first guess based on sigma?

@MichaelClerx MichaelClerx merged commit 27d8d26 into master Aug 16, 2022
@MichaelClerx MichaelClerx deleted the 1105-grad-desc-1 branch August 16, 2022 14:48
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