jolars / slopecd

4 stars 2 forks source link

feat: improve sparse computations (WIP) #40

Closed jolars closed 2 years ago

jolars commented 2 years ago

This PR improves update for the sparse case. Previously we were reducing $X_C s_C$ into a dense vector before computing $L_j$ and $X^T (y - X\beta)$, which was not very effective.

Improvements are sometimes considerable.

image

image

image

I'm not really sure actually why news20 doesn't benefit as much. Hm.

I kept the old code for reference for the moment, but we should clean it up before eventually merging.

Klopfe commented 2 years ago

This PR improves update for the sparse case. Previously we were reducing XCsC into a dense vector before computing Lj and XT(y−Xβ), which was not very effective.

Improvements are sometimes considerable.

image

image

image

I'm not really sure actually why news20 doesn't benefit as much. Hm.

I kept the old code for reference for the moment, but we should clean it up before eventually merging.

Amazing @jolars . Thanks

Klopfe commented 2 years ago

I think we should merge #40 before #39 and I'll keep working on improving the cached version for sparse matrices eventually.

Klopfe commented 2 years ago

before merging we also have to call the function for the oracle solver when ready.

jolars commented 2 years ago

I've updates the oracle solver too now.

Klopfe commented 2 years ago

Great, Thank you very much!