|
1 | 1 | /** |
2 | | - * Copyright 2024, XGBoost contributors |
| 2 | + * Copyright 2025, XGBoost contributors |
3 | 3 | * |
4 | 4 | * @brief Orindal re-coder for categorical features. |
5 | 5 | * |
6 | 6 | * For training with dataframes, we use the default encoding provided by the dataframe |
7 | 7 | * implementation. However, we need a way to ensure the encoding is consistent at test |
8 | | - * time, which is often not the case. This module re-code the test data given the train |
| 8 | + * time, which is often not the case. This module re-codes the test data given the train |
9 | 9 | * time encoding (mapping between categories to dense discrete integers starting from 0). |
10 | 10 | * |
11 | 11 | * The algorithm proceeds as follow: |
@@ -86,8 +86,8 @@ using CatPrimIndexTypes = |
86 | 86 | /** |
87 | 87 | * @brief All the column types supported by the encoder. |
88 | 88 | */ |
89 | | -using CatIndexViewTypes = decltype(std::tuple_cat(std::tuple<enc::CatStrArrayView>{}, |
90 | | - PrimToSpan<CatPrimIndexTypes>::Type{})); |
| 89 | +using CatIndexViewTypes = |
| 90 | + decltype(std::tuple_cat(std::tuple<CatStrArrayView>{}, PrimToSpan<CatPrimIndexTypes>::Type{})); |
91 | 91 |
|
92 | 92 | /** |
93 | 93 | * @brief Host categories view for a single column. |
@@ -393,7 +393,7 @@ void Recode(ExecPolicy const &policy, HostColumnsView orig_enc, Span<std::int32_ |
393 | 393 | } |
394 | 394 | } |
395 | 395 |
|
396 | | -inline std::ostream &operator<<(std::ostream &os, enc::CatStrArrayView const &strings) { |
| 396 | +inline std::ostream &operator<<(std::ostream &os, CatStrArrayView const &strings) { |
397 | 397 | auto const &offset = strings.offsets; |
398 | 398 | auto const &data = strings.values; |
399 | 399 | os << "["; |
|
0 commit comments