More support for column split in cpu predictor (#9244)
- Added column split support to `PredictInstance` and `PredictLeaf`. - Refactoring of tests.
This commit is contained in:
@@ -134,16 +134,18 @@ class Predictor {
|
||||
* usually more efficient than online prediction This function is NOT
|
||||
* threadsafe, make sure you only call from one thread.
|
||||
*
|
||||
* \param inst The instance to predict.
|
||||
* \param [in,out] out_preds The output preds.
|
||||
* \param model The model to predict from
|
||||
* \param tree_end (Optional) The tree end index.
|
||||
* \param inst The instance to predict.
|
||||
* \param [in,out] out_preds The output preds.
|
||||
* \param model The model to predict from
|
||||
* \param tree_end (Optional) The tree end index.
|
||||
* \param is_column_split (Optional) If the data is split column-wise.
|
||||
*/
|
||||
|
||||
virtual void PredictInstance(const SparsePage::Inst& inst,
|
||||
std::vector<bst_float>* out_preds,
|
||||
const gbm::GBTreeModel& model,
|
||||
unsigned tree_end = 0) const = 0;
|
||||
unsigned tree_end = 0,
|
||||
bool is_column_split = false) const = 0;
|
||||
|
||||
/**
|
||||
* \brief predict the leaf index of each tree, the output will be nsample *
|
||||
|
||||
Reference in New Issue
Block a user