skglm icon indicating copy to clipboard operation
skglm copied to clipboard

ENH - slow ``gram_cd_solver`` when fitted on sparse dataset

Open Badr-MOUFAD opened this issue 3 years ago • 0 comments

As investigated in #59 through timing and benchmarks, fitting a gram_cd_solver on a sparse dataset comes with a big overhead of computing the gram matrix, as opposed to the dense case.

Sparse case

sparse-case

Dense case

dense-case

It seems that it has to do more with scipy sparse matrix multiplication. More details about that (explanation, code snippets).

It would be beneficial to have a more efficient way to compute the gram matrix in the sparse case as it would speed up drastically the solver.

Badr-MOUFAD avatar Aug 26 '22 12:08 Badr-MOUFAD