From 6352cd72995bf952af9ff592f5057b813fb2aa5c Mon Sep 17 00:00:00 2001 From: jasjung Date: Mon, 26 Jun 2023 16:43:52 -0700 Subject: [PATCH] Update learning_to_rank.rst --- doc/tutorials/learning_to_rank.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/learning_to_rank.rst b/doc/tutorials/learning_to_rank.rst index b9883d236ac2..e0c27b87bc4c 100644 --- a/doc/tutorials/learning_to_rank.rst +++ b/doc/tutorials/learning_to_rank.rst @@ -48,8 +48,9 @@ Notice that the samples are sorted based on their query index in a non-decreasin import xgboost as xgb # Make a synthetic ranking dataset for demonstration - X, y = make_classification(random_state=rng) - rng = np.random.default_rng(1994) + seed = 1994 + X, y = make_classification(random_state=seed) + rng = np.random.default_rng(seed) n_query_groups = 3 qid = rng.integers(0, 3, size=X.shape[0])