I'm not really sure if this would be something for...
# mathematics
m
I'm not really sure if this would be something for this project, I know when it comes to large matrices simple operations like dot product, transposition etc can be very slow due to the number of elements. A while back was looking into cache oblivious algorithms, so in the case of matrix multiplication it would divide the matrix into smaller block matrices that would at run time determine the optimal size to put data into the caches of the cpu, these oblivious algorithms, some search algorithms as well, ran at nearly constant speed in terms of effiencey regardless of the dimensions. Like I said not sure if it would be something for hear or elsewhere but attempting to implement some on intensive algorithms may be useful. For instance I know that tensorflow at points can be very slow just due to tensor operations
a
Currently I try to do a slightly non-standard approach with linear algebra and to use so-called features. Meaning markers for optimization instead of type system. You can create a least of optimizations for different matrix types and find out what is currently available at commons-math, ejml and koma
m
Oh that is interesting, I will have to dive into the source to see what you are doing.
a
Yeah, I am not sure I fully understand how it will work myself. See here: https://github.com/mipt-npm/kmath/blob/dev/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixFeatures.kt The idea is that matrix has some marker features that could hold state. For example matrix could know that it is diagonal or that it is a product of two triangular matrices. This way we can do some smart matrix operations for example, we do not need LU decomposition if the matrix is a product of L and U matrix.
m
Oh okay that makes sense I will definitely look into that
Do you plan to add SVD or no, not sure if it is more of a scipy thing or not
a
I will. It is present in the commons math library, so Java back-end is easy to do. Please open an issue about it. I will also need to look into koma backend.
Koma also has svd, so I will add it to both back-ends as soon as I complete bintray setup
m
Okay I put in an issue with a link to the java backend implementation, as well as a comment for the Koma implememtation
👍 1