From a74a733238c3577ccb4ca51ba7d122ad21144a64 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Sun, 23 Apr 2023 01:33:51 +0800 Subject: [PATCH] doc. --- doc/contrib/coding_guide.rst | 2 +- python-package/xgboost/testing/data.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/contrib/coding_guide.rst b/doc/contrib/coding_guide.rst index 57bf07de4d74..f939a17b2a94 100644 --- a/doc/contrib/coding_guide.rst +++ b/doc/contrib/coding_guide.rst @@ -16,7 +16,7 @@ C++ Coding Guideline * Each line of text may contain up to 100 characters. * The use of C++ exceptions is allowed. -- Use C++14 features such as smart pointers, braced initializers, lambda functions, and ``std::thread``. +- Use C++17 features such as smart pointers, braced initializers, lambda functions, and ``std::thread``. - Use Doxygen to document all the interface code. - We have some comments around symbols imported by headers, some of those are hinted by `include-what-you-use `_. It's not required. - We use clang-tidy and clang-format. You can check their configuration in the root directory of the XGBoost source tree. diff --git a/python-package/xgboost/testing/data.py b/python-package/xgboost/testing/data.py index 1aca269f60b3..369833623bef 100644 --- a/python-package/xgboost/testing/data.py +++ b/python-package/xgboost/testing/data.py @@ -388,6 +388,7 @@ def __init__(self, eta: float) -> None: exam_prob = np.array( [0.68, 0.61, 0.48, 0.34, 0.28, 0.20, 0.11, 0.10, 0.08, 0.06] ) + # Observation probability, encoding positional bias for each position self.exam_prob = np.power(exam_prob, eta) def sample_clicks_for_query(