Login
Remember
Register
Questions
Unanswered
Categories
Ask a Question
Quiz
Ask a Question
Python: How to use MCC (Matthews correlation coefficient) as eval_metric in XGboost
+3
votes
asked
Aug 2, 2018
in
Programming Languages
by
pythonuser
(
77.8k
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?
xgboost
mcc
evel_metric
matthews correlation coefficient
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
+1
vote
answered
Aug 2, 2018
by
pkumar81
(
355k
points)
edited
Mar 2
by
pkumar81
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/
Please
log in
or
register
to add a comment.
Related questions
+4
votes
1
answer
XGBoost : how to store train and test data in a DMatrix object in Python
asked
Aug 30, 2020
in
Machine Learning
by
pythonuser
(
77.8k
points)
xgboost
python
dmatrix
+4
votes
1
answer
Python : How to find the optimal parameter values for Xgboost
asked
Mar 22, 2018
in
Machine Learning
by
pythonuser
(
77.8k
points)
python
xgboost
parameter
auc_roc
+3
votes
1
answer
How to Install XGboost for Python on Windows
asked
May 4, 2017
in
General IT Tips
by
pkumar81
(
355k
points)
xgboost
python
windows
install
+2
votes
1
answer
XGboost: How to save a trained model and load it
asked
Nov 21, 2019
in
Machine Learning
by
pythonuser
(
77.8k
points)
xgboost
model
train
load
save
+2
votes
1
answer
XGboost: how to find hyperparameters (parameters) of a trained model
asked
Nov 21, 2019
in
Machine Learning
by
pythonuser
(
77.8k
points)
xgboost
hyperparameter
model
Categories
All categories
Programming Languages
(734)
Machine Learning
(34)
Operating Systems
(132)
Databases
(97)
Web & Google
(90)
CMS Tips
(34)
General IT Tips
(90)
GK Quiz QA
(81)
...