Both the C API and Python API allow for multiple DMatrix to be cached when creating a Booster:
// --- start XGBoost class /*! * \brief create xgboost learner * \param dmats matrices that are set to be cached * \param len length of dmats * \param out handle to the result booster * \return 0 when success, -1 when failure happens */ XGB_DLL int XGBoosterCreate(const DMatrixHandle dmats, bst_ulong len, BoosterHandle *out);
Is there any information on how these cached DMatrix are used?
Most Booster functions (boost/update/eval/predict etc.) take one or more DMatrix as arguments, so trying to figure out what is the benefit of providing matrices to cache when creating a Booster.
I’m also wondering whether the Booster makes a copy of these matrices or just keeps a handle to them, mostly to work out whether it’s safe to free a DMatrix that has been cached in a Booster.