What is difference between feval
and eval_metric
in xgb.train, both parametrs are only for evaluation purpose.
Post from Kaggle gives some insight :
What is difference between feval
and eval_metric
in xgb.train, both parametrs are only for evaluation purpose.
Post from Kaggle gives some insight :
feval
is to create your own customized evaluation metric.eval_metric
if for built in metrics xgboost package is implementing.They both do roughly the same thing.
Eval_metri
c can take a string (uses their internal functions) or user defined functionfeval
only takes a functionBoth are, as you noted, for evaluation purposes.
In the below examples you can see they are used very similarly.
https://github.com/dmlc/xgboost/blob/72451457120ac9d59573cf7580ccd2ad178ef908/R-package/R/xgb.train.R#L176