SciPy - Sparse Matrices (scipy.sparse)
You have a large sparse matrix representing user-item ratings with mostly zeros. You want to efficiently compute the sum of ratings for each item (column). Which approach using CSC format is best?
.sum(axis=0) on CSC matrix efficiently sums columns without converting to dense.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions