diff --git a/src/metric/auc.cc b/src/metric/auc.cc index 9184223da..f3613228f 100644 --- a/src/metric/auc.cc +++ b/src/metric/auc.cc @@ -126,8 +126,8 @@ float MultiClassOVR(std::vector const& predts, MetaInfo const& info) { for (size_t c = 0; c < n_classes; ++c) { if (local_area[c] != 0) { // normalize and weight it by prevalence. After allreduce, `local_area` means the - // total covered area (not area under curve, rather it's the accessible are for each - // worker) for each class. + // total covered area (not area under curve, rather it's the accessible area for + // each worker) for each class. auc_sum += auc[c] / local_area[c] * tp[c]; tp_sum += tp[c]; } else { @@ -310,7 +310,7 @@ class EvalAUC : public Metric { } }; -XGBOOST_REGISTER_METRIC(EvalBinaryAUC, "auc") +XGBOOST_REGISTER_METRIC(EvalAUC, "auc") .describe("Receiver Operating Characteristic Area Under the Curve.") .set_body([](const char*) { return new EvalAUC(); }); diff --git a/src/metric/auc.cu b/src/metric/auc.cu index 433d84710..615dad5ae 100644 --- a/src/metric/auc.cu +++ b/src/metric/auc.cu @@ -74,7 +74,7 @@ struct DeviceAUCCache { * * - Run scan to obtain TP/FP values, which are right coordinates of trapesoid. * - Find distinct prediction values and get the corresponding FP_PREV/TP_PREV value, - * which are left coordinates of trapesoid. + * which are left coordinates of trapesoids. * - Reduce the scan array into 1 AUC value. */ std::tuple @@ -151,7 +151,7 @@ GPUBinaryAUC(common::Span predts, MetaInfo const &info, d_neg_pos[d_unique_idx[i]] = d_fptp[d_unique_idx[i] - 1]; if (i == d_unique_idx.size() - 1) { // last one needs to be included, may override above assignment if the last - // prediction value is district from previous one. + // prediction value is distinct from previous one. d_neg_pos.back() = d_fptp[d_unique_idx[i] - 1]; return; }