MCPcopy Create free account
hub / github.com/dmlc/xgboost / EmptyDMatrix

Function EmptyDMatrix

tests/cpp/helpers.h:365–367  ·  view source on GitHub ↗

Generate an empty DMatrix, mostly for its meta info.

Source from the content-addressed store, hash-verified

363
364// Generate an empty DMatrix, mostly for its meta info.
365inline std::shared_ptr<DMatrix> EmptyDMatrix() {
366 return RandomDataGenerator{0, 0, 0.0}.GenerateDMatrix();
367}
368
369[[nodiscard]] std::vector<float> GenerateRandomCategoricalSingleColumn(std::size_t n,
370 std::size_t n_categories);

Callers 10

TestMAPStatFunction · 0.85
VerifyBinaryAUCFunction · 0.85
VerifyAFTNegLogLikFunction · 0.85
TestRankingCacheFunction · 0.85
TestNDCGCacheFunction · 0.85
TestMAPCacheFunction · 0.85

Calls 1

GenerateDMatrixMethod · 0.80

Tested by 10

TestMAPStatFunction · 0.68
VerifyBinaryAUCFunction · 0.68
VerifyAFTNegLogLikFunction · 0.68
TestRankingCacheFunction · 0.68
TestNDCGCacheFunction · 0.68
TestMAPCacheFunction · 0.68