+3 votes
in Programming Languages by (28.1k points)
I want to use MCC as the eval_metric in XGBoost classifier, but MCC is not in the list of the values for eval_metric. Is there any way to use user-defined function as eval_metric in xgboost?

1 Answer

0 votes
by (48.7k points)
edited by
You can use MCC as eval_metric in XGboost. You need to define a small function to use MCC as eval_metric. Have a look at the sample code here: https://www.discoverbits.in/post/python-using-matthews-correlation-coefficient-mcc-as-evaluation-metric-in-xgboost/