Skip to content

Commit 5d4fd8a

Browse files
committed
Update.
1 parent 40399a8 commit 5d4fd8a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/data/cat_container.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2024, XGBoost Contributors
2+
* Copyright 2025, XGBoost Contributors
33
*/
44
#pragma once
55

src/encoder/ordinal.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2024, XGBoost contributors
2+
* Copyright 2025, XGBoost contributors
33
*/
44
#pragma once
55

@@ -103,7 +103,7 @@ struct SegmentedSearchSortedNumOp {
103103
return l_value < r_value;
104104
});
105105
if (ret_it == it + f_sorted_idx.size()) {
106-
return SearchKey(); // not found
106+
return detail::NotFound();
107107
}
108108
return *ret_it;
109109
}

src/encoder/ordinal.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* Copyright 2024, XGBoost contributors
2+
* Copyright 2025, XGBoost contributors
33
*
44
* @brief Orindal re-coder for categorical features.
55
*
66
* For training with dataframes, we use the default encoding provided by the dataframe
77
* 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
99
* time encoding (mapping between categories to dense discrete integers starting from 0).
1010
*
1111
* The algorithm proceeds as follow:
@@ -86,8 +86,8 @@ using CatPrimIndexTypes =
8686
/**
8787
* @brief All the column types supported by the encoder.
8888
*/
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{}));
9191

9292
/**
9393
* @brief Host categories view for a single column.
@@ -393,7 +393,7 @@ void Recode(ExecPolicy const &policy, HostColumnsView orig_enc, Span<std::int32_
393393
}
394394
}
395395

396-
inline std::ostream &operator<<(std::ostream &os, enc::CatStrArrayView const &strings) {
396+
inline std::ostream &operator<<(std::ostream &os, CatStrArrayView const &strings) {
397397
auto const &offset = strings.offsets;
398398
auto const &data = strings.values;
399399
os << "[";

tests/cpp/encoder/test_ordinal.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2024, XGBoost contributors
2+
* Copyright 2025, XGBoost contributors
33
*/
44
#include "test_ordinal.h"
55

tests/cpp/encoder/test_ordinal.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2024, XGBoost contributors
2+
* Copyright 2025, XGBoost contributors
33
*/
44
#include <gtest/gtest.h>
55
#include <thrust/device_vector.h>

0 commit comments

Comments
 (0)