-
Notifications
You must be signed in to change notification settings - Fork 9
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
New calculus rules #10
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10 +/- ##
==========================================
- Coverage 84.27% 83.81% -0.47%
==========================================
Files 45 49 +4
Lines 1475 1643 +168
==========================================
+ Hits 1243 1377 +134
- Misses 232 266 +34
Continue to review full report at Codecov.
|
src/calculus/HadamardProd.jl
Outdated
|
||
Compose opeators such that: | ||
|
||
`(Ax).*(Bx)` |
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.
This passage is not really clear. Maybe mention explicitly state that P*x = A*x .* B*x
where P
is the operator being constructed.
Also, this operator seems to in fact reduce to the usual Hadamard product between matrices in the linear case: is the nonlinear case a well known generalization? Just asking out of curiosity, to make sure there’s no confusion with the naming
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'll make the docs more clear, thanks for pointing that out!
Not sure how much the nonlinear generalization is known, however it is, as usual, the chain rule applied 😄
Anyway the name could be perhaps improved with something like HadamardCompose
, but it is very lengthy.
By the way my idea is to deprecate the other calc rule Hadamard
since HadamardProd
generalises it. So definitively it won't be confused with that one.
(updated first comment ⬆️ )
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.
Food for thought: what is missing to be able to simply express these rules using composition? It seems to me like these are highly redundant.
Yes I agree there’s a high level of redundancy... probably all the Ax_mul_Bx variants can be merged into a single one! But I still don’t have a clear idea on how! Maybe a new calculus rule that transposes the output would do the job... future work though! |
Ax_mul_Bx
--> GeneralizesNonLinearCompose
Axt_mul_Bx
Ax_mul_Bxt
HadamardProd
--> GeneralizesHadamard
Hadamard
&NonLinearCompose
will be deprecated in future version of AbstractOperators.