| 307 | } // anonymous namespace |
| 308 | |
| 309 | void TestPredictionWithLesserFeatures(Context const *ctx) { |
| 310 | size_t constexpr kRows = 256, kTrainCols = 256, kTestCols = 4, kIters = 4; |
| 311 | auto m_train = RandomDataGenerator(kRows, kTrainCols, 0.5).GenerateDMatrix(true); |
| 312 | auto learner = LearnerForTest(ctx, m_train, kIters); |
| 313 | auto m_test = RandomDataGenerator(kRows, kTestCols, 0.5).GenerateDMatrix(false); |
| 314 | auto m_invalid = RandomDataGenerator(kRows, kTrainCols + 1, 0.5).GenerateDMatrix(false); |
| 315 | VerifyPredictionWithLesserFeatures(learner.get(), kRows, m_test, m_invalid); |
| 316 | } |
| 317 | |
| 318 | void TestPredictionDeviceAccess() { |
| 319 | Context ctx; |
no test coverage detected