Search code examples
pythonmachine-learningclassificationxgboostcross-validation

xgboost cross validation - accuracy metrics


I'm doing cross validation on xgboost. Here is my code.

from xgboost import cv

xgb_cv = cv(dtrain=data_dmatrix, 
            params=params, 
            nfold=10,
            num_boost_round=50, 
            early_stopping_rounds=10, 
            metrics="auc", 
            as_pandas=True, 
            seed=1)

Is there any way to have "accuracy" metrics?

I couldn't find any "accuracy" option for "metrics" in the documentation.


Solution

  • The accuracy is 1 - the error rate (metrics = 'error').