-
Notifications
You must be signed in to change notification settings - Fork 89
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
Symmetric/Hermitian matrix function rules #193
Merged
Merged
Changes from 4 commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
6d66438
Add symmetric/hermitian eigendecomposition rules
sethaxen cac5290
Add utility functions
sethaxen bd16f24
Add frules and rrules for sym/herm power series
sethaxen bbbabf5
Add int pow rules
sethaxen b776223
Add sincos rules
sethaxen 8d1fdd0
Remove unused function argument
sethaxen d50ba1e
Fix and comment _nonzero
sethaxen ee3a6fb
Make methods and signatures less ambiguous
sethaxen 622b5b4
Handle Zero() better
sethaxen 14b7266
Standardize notation
sethaxen 57df366
Remove parens
sethaxen 8c8790a
Update src/rulesets/LinearAlgebra/structured.jl
sethaxen 0fdd8a5
Merge branch 'symhermpowseries' of https://github.com/sethaxen/ChainR…
sethaxen ef15c71
Fix for Julia 1.0
sethaxen ad9d36f
Use correct variable and method name
sethaxen 0078a58
Accumulate in the triangle in the pullback
sethaxen 5d1685f
Remove comment
sethaxen 4366b26
Add eigen and eigvals tests
sethaxen f6075a5
Remove outdated comment
sethaxen 90e3225
Clean up and make constraint functions faster
sethaxen e35ffef
Make outputs of int pow of Hermitian are Hermitian
sethaxen a604e45
Fix typo in comment
sethaxen c28304c
Test most power series functions
sethaxen e211034
Don't thunk tangents
sethaxen 3ccfa91
Merge branch 'master' into symhermpowseries
sethaxen e4ec19d
Merge branch 'master' into symhermpowseries
sethaxen 6d7c00c
Make type-stable and use optimal threshold
sethaxen 115c201
Merge branch 'master' into symhermpowseries
sethaxen c877818
Merge branch 'master' into symhermpowseries
sethaxen f41bfe0
Split out symmetric/hermitian methods/tests
sethaxen 52eef4d
Use correct pullback of hermitrization
sethaxen af12bed
Stabilize eigenvector computation
sethaxen 46a4ec4
Test composed pullback
sethaxen e257b11
Remove all eigendecomposition rules
sethaxen 6010c2f
Merge branch 'master' into symhermpowseries
sethaxen 9571d19
Move to utilities section
sethaxen d7e3762
Move to utilities section
sethaxen 64f96ee
Separate shared code into its own function
sethaxen 109ce2c
Don't thunk
sethaxen 00cccbc
Use correct function name
sethaxen eb0a7e2
Correctly broadcast
sethaxen c5a37da
Remove power rules
sethaxen 648e13e
Merge branch 'master' into symhermpowseries
sethaxen d8b22f1
Rename to matrix functions
sethaxen 0b0cd85
Remove pow tests
sethaxen f945b13
Expand test suite
sethaxen 2087dac
Remove sincos rules for now
sethaxen 97ec070
Add references and comments
sethaxen 5f1529d
Add _isindomain
sethaxen 537c1f8
Refactor _matfun
sethaxen 65be168
Add _matfun_frechet
sethaxen 2b3e11a
Broadcast instead of indexing
sethaxen ac0253c
Add comments and use indexing from paper
sethaxen b7b83f5
Handle Zeros
sethaxen 1c6a889
Contrain differentials according to primals
sethaxen 21340c9
Support all matrix functions
sethaxen 7bf9b7c
Remove unused methods
sethaxen 7d78762
Support Symmetric{Complex}
sethaxen d1e9947
Add rules for sincos
sethaxen 444a49b
Make atanh rule type-stable
sethaxen 7dcc8a2
Correctly test type-unstable functions
sethaxen eb52188
Use correct denominator
sethaxen f78945a
Add tests for almost-singular and low-rank matrices
sethaxen c8885cd
Remove out-dated comments
sethaxen b65f552
Test alternate differentials
sethaxen e6106f3
Don't use only
sethaxen 68b9597
Remove _hermitrizeback!
sethaxen 0778d7a
Don't use hasproperty, not in old Julia versions
sethaxen 77cba6d
Reduce allocations
sethaxen fc34770
simplify section name
sethaxen 62afe5e
Simplify line
sethaxen 69bcbe8
Handle mixture of non-Zero and Zero
sethaxen 6f6d38b
Don't loop over unused functions
sethaxen 2f6cbeb
Test against component frules instead of fd
sethaxen 673a258
Test that rules produce same uplo as primal
sethaxen 357ecb8
Apply suggestions from code review
sethaxen bf2191c
Reuse variable name
sethaxen f1cba00
Use bang bang convention for maybe-in-place
sethaxen 05e8363
Don't assume the wrapped matrix is mutable
sethaxen 8a60771
Replace hermitrize!
sethaxen 8c77687
Use diagind
sethaxen 3ce3d8a
Remove handling of Zero differential
sethaxen 9b40c09
Unify symbols
sethaxen e9aef74
Use hasproperty
sethaxen e338822
Load hasproperty from Compat
sethaxen 17686f2
Replace refs with one to Higham
sethaxen 359a1dc
Add docstrings
sethaxen 32a9cca
Update src/rulesets/LinearAlgebra/symmetric.jl
sethaxen d81ee72
Merge branch 'master' into symhermpowseries
sethaxen 73d5d01
Merge branch 'master' into symhermpowseries
sethaxen fd60d44
Increment version number
sethaxen 867ea12
Use utility function
sethaxen b7f6c40
Stabilize jvp Jacobian dimensions
sethaxen f956f62
Don't use non-exported function
sethaxen d3ff01a
Bump required ChainRulesCore
sethaxen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't love that we are using an explictly nonexported function.
Do we even need to be testing
@inferred
here, or can we rely onfrule_test
to do that for us laterThere 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.
Unfortunately we cannot use
frule_test
orrrule_test
here because we need to work around the outputs of some functions being type-unstable. (andrrule
's won't agree with FiniteDifferences forSymmetric
/Hermitian
, only with them composed with the constructor). I copied over a simplifiedis_inferrable
.