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

Constrain precision parameter during optimization #8

Merged
merged 1 commit into from
Jun 11, 2023
Merged

Conversation

ararslan
Copy link
Owner

Also adjust some expressions for improved numerical accuracy.

The model coefficients are unbounded but the precision must be positive in order for the solution to be feasible. We can impose such a constraint by setting the precision to the maximum of the updated value at the current step and machine epsilon. This bumps Newton back into the feasible region so that optimization can continue in the right direction.

Based on ideas and discussion with Jason Manley and Phillip Alday. Both are included as coauthors of this commit.

Fixes #6.

Also adjust some expressions for improved numerical accuracy.

The model coefficients are unbounded but the precision must be positive
in order for the solution to be feasible. We can impose such a
constraint by setting the precision to the maximum of the updated value
at the current step and machine epsilon. This bumps Newton back into the
feasible region so that optimization can continue in the right
direction.

Based on ideas and discussion with Jason Manley and Phillip Alday. Both
are included as coauthors of this commit.

Fixes #6.

Co-authored-by: Jason Manley <jason.manley@beacon.bio>
Co-authored-by: Phillip Alday <palday@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (861626b) 99.16% compared to head (685a9c6) 99.16%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files           1        1           
  Lines         240      240           
=======================================
  Hits          238      238           
  Misses          2        2           
Impacted Files Coverage Δ
src/BetaRegression.jl 99.16% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ararslan ararslan merged commit 24f9a03 into main Jun 11, 2023
6 checks passed
@ararslan ararslan deleted the aa/numerics branch June 11, 2023 00:14
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.

Convergence failures where R betareg succeeds
2 participants