catboost/catboost

/src/catboost/catboost/libs/metrics/metric.cpp:6745: All train targets are equal

MMotionMan opened this issue · 1 comments

Problem: /src/catboost/catboost/libs/metrics/metric.cpp:6745: All train targets are equal
catboost version: 1.2.3
Operating System: Linux
CPU: 4 cores, 16gb ram
GPU: Tesla T4 15gb GPU ram

random_test_targets = [[0 if random() < 0.8 else 1 for i in range(22)] for j in range(15)]
print(random_test_targets) # random_test_targets.shape = [15, 22] non zeros

aug_text_vec = np.array(aug_text_vec) #text embeddings (aug_text_vec.shape = [15, 322])
random_test_targets = np.array(random_test_targets)

model = CatBoostClassifier(iterations=1000,
                            max_depth=6,
                            learning_rate=0.035,
                            task_type="GPU",
                            devices='0:1',
                            loss_function='MultiLogLoss')

model.fit(aug_text_vec, random_test_targets)

If you add more class labels = 1, then the model is trained without errors. I don't quite understand how the minimum and maximum are compared to check the difference of labels in the case of using MultiLogLoss

Duplicate of #1970