20.03.2021 Views

Deep-Learning-with-PyTorch

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

356 CHAPTER 12 Improving training with metrics and augmentation

12.9 Summary

• A binary label and a binary classification threshold combine to partition the

dataset into four quadrants: true positives, true negatives, false negatives, and

false positives. These four quantities provide the basis for our improved performance

metrics.

• Recall is the ability of a model to maximize true positives. Selecting every single

item guarantees perfect recall—because all the correct answers are included—

but also exhibits poor precision.

• Precision is the ability of a model to minimize false positives. Selecting nothing

guarantees perfect precision—because no incorrect answers are included—but

also exhibits poor recall.

• The F1 score combines precision and recall into a single metric that describes

model performance. We use the F1 score to determine what impact changes to

training or the model have on our performance.

• Balancing the training set to have an equal number of positive and negative

samples during training can result in the model performing better (defined as

having a positive, increasing F1 score).

• Data augmentation takes existing organic data samples and modifies them such

that the resulting augmented sample is non-trivially different from the original,

but remains representative of samples of the same class. This allows additional

training without overfitting in situations where data is limited.

• Common data augmentation strategies include changes in orientation, mirroring,

rescaling, shifting by an offset, and adding noise. Depending on the project,

other more specific strategies may also be relevant.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!