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

feat: grad_scale option for fit #97

Merged
merged 1 commit into from
Aug 20, 2023
Merged

feat: grad_scale option for fit #97

merged 1 commit into from
Aug 20, 2023

Conversation

jiangyi15
Copy link
Owner

@jiangyi15 jiangyi15 commented Aug 20, 2023

$\min [ L(x) ] => \min [ k L(x)] $, k is a scale factor.
It could improve fit stability when the $|k L(x)|$ is not too large or small.

config.fit(grad_scale=1e-3)

A test of scale vs fit cost time and number of function evaluations. The final $- \ln L \approx -5187$.
scale_vs_time
scale_vs_nfev

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #97 (05fa8ae) into dev (b8e892c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev      #97   +/-   ##
=======================================
  Coverage   75.04%   75.05%           
=======================================
  Files         106      106           
  Lines       15270    15271    +1     
  Branches     2844     2844           
=======================================
+ Hits        11460    11461    +1     
  Misses       3122     3122           
  Partials      688      688           
Flag Coverage Δ
unittests 75.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
tf_pwa/config_loader/config_loader.py 66.82% <ø> (ø)
tf_pwa/fit.py 22.75% <100.00%> (ø)
tf_pwa/fit_improve.py 56.43% <100.00%> (+0.12%) ⬆️

@jiangyi15 jiangyi15 merged commit f5db1ef into dev Aug 20, 2023
13 checks passed
@jiangyi15 jiangyi15 deleted the grad_scale branch August 20, 2023 13:11
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.

1 participant