liveBook · Manning

Accuracy

As explained in Build AI Drug Discovery Pipelines

Accuracy is the proportion of all classified instances that receive the correct predicted class.

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.7933463161311263

The five-fold evaluation reports mean accuracy across validation folds, illustrating how to assess performance beyond the training score. section 3.3.3

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Uses training and validation results to illustrate accuracy, then warns that it is insufficient alone for imbalanced classes.
Examples
Uses hERG blocker predictions and CYP3A4 inhibition to compare model accuracy with validation results and dummy baselines.
What you can do after
Evaluate classifier scores and compare them with baselines and validation performance.
How it connects
Connects accuracy to classification, cross-validation, confusion matrices, precision, and recall.

Also explained in

Compare how 49 books explain accuracy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.