Accuracy is the proportion of classified instances assigned the correct class. It offers a simple first check of a classifier’s predictions, such as a model that predicts hERG blockers. section 3.3.2
A high score can mislead when classes are imbalanced: predicting only the most frequent class reaches almost 70% accuracy in the hERG example. Compare accuracy with a baseline and validation results, and inspect precision and recall for a fuller performance picture. section 3.3.3 section 5.1.2
Listing 3.9 5-fold cross validation
>>> from sklearn.model_selection import cross_validate
>>> scoring = {'acc': 'accuracy'}
>>> lin_cls_scores = cross_validate(
lin_cls, train_fingerprints, train_labels, scoring=scoring, cv=5
)
>>>lin_cls_scores["test_acc"].mean()
0.7933463161311263The five-fold evaluation reports mean accuracy across validation folds, illustrating how to assess performance beyond the training score. section 3.3.3
















































