Closed dkarrasch closed 1 year ago
Base: 99.58% // Head: 99.47% // Decreases project coverage by -0.11%
:warning:
Coverage data is based on head (
e088b23
) compared to base (bd10c6c
). Patch coverage: 96.96% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@PythonNut Do you wanna take a look and see if it's useful for you?
This is a major improvement for a narrow, but potentially interesting case: https://github.com/MichielStock/Kronecker.jl/issues/91.
EDIT: I realized it makes sense to introduce a
KhatriRaoMap
type, which corresponds to "columnwise Kronecker products". For not too small matricesA
andB
with equal number of columns (say larger than 5), map-vector-application is faster than what you get for a materialized matrix-vector product, besides the added benefit that this is lazy! In other languages, explicit versions seem to be pretty standard, see:https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.khatri_rao.html https://www.rdocumentation.org/packages/Matrix/versions/1.4-1/topics/KhatriRao
Unfortunately, I couldn't find an improved way to implement the rowwise Kronecker product, or "face-splitting product", but since it's related to the adjoint/transpose of the Khatri-Rao product, it's included anyway.