pub(crate) fn train_model_with_scratch(
samples: &[TreeSample],
scratch: &mut FitScratch,
) -> Result<TrainResult, String>Expand description
Fit a tree and compute holdout metrics reusing the scratch arena. The scratch buffers are cleared in place, so the second call with the same window size does not allocate.