Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading