+3 votes
in Programming Languages by (75.0k 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

+1 vote
by (353k points)
edited by
 
Best answer
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.tellustheanswer.com/python-using-matthews-correlation-coefficient-mcc-as-evaluation-metric-in-xgboost/

...