[catboost] Sort indices in case someone expects them to be sorted
@@ -64,6 +64,8 @@ TVector<int> GetCategoricalFeatureIndices(const NCB::TQuantizedPool& pool) {
categoricalIds.push_back(static_cast<int>(featureIndex));
}
+ Sort(categoricalIds);
+
return categoricalIds;
}
@@ -79,6 +81,7 @@ TVector<int> GetIgnoredFeatureIndices(const NCB::TQuantizedPool& pool) {
const auto featureIndex = columnIndexToFeatureIndex.at(kv.first);
if (IsIn(pool.IgnoredColumnIndices, kv.first)) {
indices.push_back(static_cast<int>(featureIndex));
+ continue;
}
const auto it = pool.QuantizationSchema.GetFeatureIndexToSchema().find(featureIndex);
@@ -92,5 +95,7 @@ TVector<int> GetIgnoredFeatureIndices(const NCB::TQuantizedPool& pool) {
}
}
+ Sort(indices);
+
return indices;
}
