* Change DefaultEvalMetric of classification from error to logloss * Change default binary metric in plugin/example/custom_obj.cc * Set old error metric in python tests * Set old error metric in R tests * Fix missed eval metrics and typos in R tests * Fix setting eval_metric twice in R tests * Add warning for empty eval_metric for classification * Fix Dask tests Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
16 lines
395 B
C++
16 lines
395 B
C++
#include <gtest/gtest.h>
|
|
#include <xgboost/objective.h>
|
|
#include <string>
|
|
#include "../helpers.h"
|
|
|
|
namespace xgboost {
|
|
|
|
TEST(Plugin, ExampleObjective) {
|
|
xgboost::GenericParameter tparam = CreateEmptyGenericParam(GPUIDX);
|
|
auto * obj = xgboost::ObjFunction::Create("mylogistic", &tparam);
|
|
ASSERT_EQ(obj->DefaultEvalMetric(), std::string{"logloss"});
|
|
delete obj;
|
|
}
|
|
|
|
} // namespace xgboost
|