Error message when cat feature is CTR in calc_feature_statistics()
@@ -303,7 +303,11 @@ namespace NCB {
const EPredictionType predictionType,
const int threadCount) {
const int featureFlatNum = GetOneHotFeatureFlatNum(model, featureNum);
- if (featureFlatNum != -1) {
+
+ CB_ENSURE_INTERNAL(
+ featureFlatNum == -1,
+ "Supported only for one-hot encoded features. Use one_hot_max_size when training to manage that."
+ );
return GetBinarizedOneHotFeatureStatistics(
model,
dataset,
@@ -313,8 +317,6 @@ namespace NCB {
threadCount
);
}
- return {}; // CTR statistics
- }
ui32 GetCatFeaturePerfectHash(
const TFullModel& model,
