I want to run a model for multiclassification problem and I am only interested in the top x% results (recommendation model). I think using the ndcg@1000 evaluation metric is the best for this purpose, however it is not working for multiclass problem on its own. I have 3 classes and I have a most important one. The three classes are: 0: the user is neutral to the product 1: the user is totally against the product 2: the user is likely to buy the product
I am curious about the class 2 so the 0, 1 classes could be grouped. Do you have any idea how I could tackle it? Thank you very much!
clf_xgb_out_of_sample = xgb.XGBClassifier(objective = "multi:softmax", num_class = 3, seed = 42, n_estimators=500, max_depth = 8, learning_rate = 0.08, gamma = 0.25, colsample_bytree = 0.8, use_label_encoder = False)
clf_xgb_out_of_sample.fit(X_train, y_train, sample_weight = weights, verbose = True, early_stopping_rounds = 10, eval_metric = 'ndcg@1000', eval_set = [(X_test, y_test['Score'])])