2 ms·
“““ So instead, let's flip the matrix, sort the elements row-wise, and revisit the multiplications from that direction. This is called a Compressed Sparse Row
by bigcat12345678 3y ago
“““
So instead, let's flip the matrix, sort the elements row-wise, and revisit the multiplications from that direction.
This is called a Compressed Sparse Row (CSR) format by the smart people. To do the multiplication now, we take, say, the 1 from the vector, multiply it by 256, and add it into the output vector at the 3rd row. And so on.
Now, let's see what happens if we truncate the last column - the one with the lowest values.
”””
How does csr works with reduced numbers multiplication?
- kolinko 3y agoCan you rephrase the question? Not sure I get it.
- bigcat12345678 3y agoI could not read from the text how multiplication with CSR format works in the context of optimization. The key missing piece for me is that how to utilize CSR format to find the numbers to do multiplication, in other words, how does CSR format helps with picking the numbers to multiply with the vector.
- kolinko 3y agoAh, I get the question now. If I understand correctly CSR, it stores indexes and values as a list. I store them also as a list - that's why the comparison is there. The difference is that with CSR you store say 15% of the values from a given row. I store all of them, but use only the first X% of them. The X% varies and depends on the input vector. They are stored sorted, from the one of a highest absolute value to the lowest absolute value. It's after midnight so my explanations may not be too good now, but I hope the pseudocode on the page and the examples explain it slightly better. I'll be fixing grammar / typos, and asking ChatGPT to rewrite the page text for me tomorrow to make it more readable :)