-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add epsilon to PositiveDefinite
#72
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #72 +/- ##
==========================================
+ Coverage 97.41% 97.43% +0.02%
==========================================
Files 8 8
Lines 232 234 +2
==========================================
+ Hits 226 228 +2
Misses 6 6 ☔ View full report in Codecov by Sentry. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This is a really good point -- I'm kind of surprised we'd not encountered this before. Could we maybe just stick with a single positive definite type, but incorporate your change, rather than having two types? I think basically we're doing positive-definiteness incorrectly at the minute.
No idea to be honest. I'm not aware of a way to pick a really good value.
If you're happy with modifying the existing |
PositiveDefinite
with epsilonPositiveDefinite
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Ok, I removed the additional type and bumped the version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thanks! Please feel free to merge.
In contrast to
Positive
, the currentPositiveDefinite
type is not guaranteed to stay strictly positive as the unconstrained parameter goes to zero. This PR changes that to make the behavior ofPositiveDefinite
analogous toPositive
, and introduces a new type for the existing behavior. Open questions:Positive
usessqrt(eps(T))
, not sure where this is coming from. I pickedeps(T)
for now as the other one seemed too big.StrictlyPositiveDefinite
) and the existing name keeps behavior.