| 144 | } |
| 145 | |
| 146 | void TestPoissonRegressionGPair(const Context* ctx) { |
| 147 | std::vector<std::pair<std::string, std::string>> args; |
| 148 | std::unique_ptr<ObjFunction> obj{ObjFunction::Create("count:poisson", ctx)}; |
| 149 | |
| 150 | args.emplace_back("max_delta_step", "0.1f"); |
| 151 | obj->Configure(args); |
| 152 | // clang-format off |
| 153 | CheckObjFunction(obj, |
| 154 | { 0, 0.1f, 0.9f, 1, 0, 0.1f, 0.9f, 1}, |
| 155 | { 0, 0, 0, 0, 1, 1, 1, 1}, |
| 156 | { 1, 1, 1, 1, 1, 1, 1, 1}, |
| 157 | { 1, 1.10f, 2.45f, 2.71f, 0, 0.10f, 1.45f, 1.71f}, |
| 158 | {1.10f, 1.22f, 2.71f, 3.00f, 1.10f, 1.22f, 2.71f, 3.00f}); |
| 159 | CheckObjFunction(obj, |
| 160 | { 0, 0.1f, 0.9f, 1, 0, 0.1f, 0.9f, 1}, |
| 161 | { 0, 0, 0, 0, 1, 1, 1, 1}, |
| 162 | {}, // Empty weight |
| 163 | { 1, 1.10f, 2.45f, 2.71f, 0, 0.10f, 1.45f, 1.71f}, |
| 164 | {1.10f, 1.22f, 2.71f, 3.00f, 1.10f, 1.22f, 2.71f, 3.00f}); |
| 165 | // clang-format on |
| 166 | } |
| 167 | |
| 168 | void TestPoissonRegressionBasic(const Context* ctx) { |
| 169 | std::vector<std::pair<std::string, std::string>> args; |
no test coverage detected