Define multi-strategy parameter. (#8890)

This commit is contained in:
Jiaming Yuan
2023-03-11 02:58:01 +08:00
committed by GitHub
parent 6deaec8027
commit 2aa838c75e
6 changed files with 221 additions and 134 deletions

View File

@@ -24,6 +24,7 @@
#include "../../src/data/array_interface.h"
#include "../../src/gbm/gbtree_model.h"
#include "filesystem.h" // dmlc::TemporaryDirectory
#include "xgboost/linalg.h"
#if defined(__CUDACC__)
#define DeclareUnifiedTest(name) GPU ## name
@@ -461,7 +462,7 @@ inline LearnerModelParam MakeMP(bst_feature_t n_features, float base_score, uint
int32_t device = Context::kCpuId) {
size_t shape[1]{1};
LearnerModelParam mparam(n_features, linalg::Tensor<float, 1>{{base_score}, shape, device},
n_groups);
n_groups, 1, MultiStrategy::kComposite);
return mparam;
}