Skip to content
Quantoros

Why choose CSR or CSC before passing sparse features to a scaler?

Classic MLLevel: IntermediateSparse storage copies

Why choose CSR or CSC before passing sparse features to a scaler?

Hints
  • Consider representation conversion.
  • Peak memory includes temporary copies.

Answer

These formats are directly supported; other sparse formats may be converted to CSR. Choosing upstream avoids unexpected conversion copies and peak memory.

Source and licence: scikit-learn 1.7.2 — preprocessing · BSD-3-Clause · answer: Quantoros editorial

Related questions