Skip to content
Quantoros

Why can fitting a tree to a large float64 array cause an additional memory allocation?

Classic MLLevel: IntermediateTree input memory

Why can fitting a tree to a large float64 array cause an additional memory allocation?

Hints
  • Internal dtype may differ from input dtype.
  • Peak memory includes conversion buffers.

Answer

The documented tree implementation converts inputs to float32 internally. Supplying a compatible representation may avoid a conversion copy, but confirm precision and sparse-format requirements.

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

Related questions