user5511317
user5511317

Reputation:

Catboost predicton return error Feature Marked different in dataset

I trained binary classifier with catboost, same featues in test data it return this error;

catboost/libs/data/model_dataset_compatibility.cpp:47: Feature MERCHANT_ID is Categorical in model but marked different in the dataset

What does it mean, anyone have an idea? Thanks.

Upvotes: 1

Views: 3232

Answers (1)

Andreyn
Andreyn

Reputation: 314

It looks like MERCHANT_ID is handled as categorical column during training (fit stage), and you provided its index as categorical column, but during predict on the test data either MERCHANT_ID has a different type, or your columns shifted, thus the model expect to see the column in a different index location.

verify that the column positions in X_train and X_test are the same.

Upvotes: 1

Related Questions