Skip to content
Quantoros

Why can mutating the training array after fitting an SVC with a callable kernel change later behavior unexpectedly?

Classic MLLevel: AdvancedTraining reference lifetime

Why can mutating the training array after fitting an SVC with a callable kernel change later behavior unexpectedly?

Hints
  • Check ownership, not only fitted coefficients.
  • Inference may still consult training inputs.

Answer

This answer is part of mentoring

Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.

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

Related questions