'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 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 desertnaut