Skip to content

Commit

Permalink
[doc] Update learning_to_rank.rst (#9336)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasjung authored Jun 27, 2023
1 parent cfa9c42 commit 96c3071
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/tutorials/learning_to_rank.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 96c3071

Please sign in to comment.