34 min total

Deep Learning

Metrics & model evaluation

Metrics & model evaluation

A model is easier to improve when the evaluation reflects the problem we actually want to solve.

Orthogonalization

In orthogonalization, you have some controls, but each control does a specific task and doesn’t affect other controls

refers to breaking down a problem into distinct, manageable parts.

Metrics & model evaluation — diagram
  1. You’ll have to fit training set well on cost function (near human level performance if possible). If it’s not achieved you could try bigger network, another optimization algorithm (like Adam)…
  2. Fit dev set well on cost function. If it's not achieved you could try regularization, bigger training set…
  3. Fit test set well on cost function. If it's not achieved you could try bigger dev. set…
  4. Performs well in real world. If it's not achieved you could try change dev. set, change cost function…

Single number evaluation metric

Its better and faster to set a single number evaluation metric for your project before you start it.

Using a precision/recall for evaluation is good in a lot of cases, but separately they don’t tell you which algorithms is better.

better thing is to combine precision and recall in one single (real) number evaluation metric called F1 score,

There are two kinds of metrics

  1. Optimizing metrics
    we only need to optimize their value
  2. Satisfying metrics
    'good to have metrics'

Score = 1(optimizing metrics score) + 0.4(satisfying metric 1) + 0.1(satisfying metric 2)

Dev/train/test set

Dev and test set should be from same distributions to reflect data you expect to get in the future and consider important to do well on

An old way of splitting the data was 70% training, 30% test or 60% training, 20% dev, 20% test.

The old way was valid for a number of examples ~ <100000

In the modern  deep learning if you have a million or more examples a reasonable split would be 98% training, 1% dev, 1% test.

Human-level performance

Metrics & model evaluation — diagram

We compare to human-level performance for two key reasons:

  1. Recent deep learning advances have made machine learning competitive with human performance in many areas.
  2. Designing ML systems is more efficient when aiming for tasks humans can do.

You won’t surpass an error that’s called “Bayes optimal error”

Metrics & model evaluation — diagram

Importance of human level performance

Benchmarking: Human-level performance provides a useful benchmark for understanding how well a machine learning model is performing relative to the best achievable performance.

Guidance: Knowing human-level performance helps determine whether to focus on reducing bias or variance in your model.

Metrics & model evaluation — diagram

Bias Focus: When human-level error is low (e.g., 1%), and the model's training error is significantly higher, focus on reducing bias.

Variance Focus: When human-level error is relatively high (e.g., 7.5%), and the model's training error is close to it, focus on reducing variance.

We use human error as a proxy to bayes (optimal) error

Avoidable Bias Indicates how much potential there is for improving the model's fit to the training data without overfitting.

Bias-Reduction Strategies: Increase model complexity, improve feature engineering, extend training duration.

Variance-Reduction Strategies: Regularization, data augmentation, cross-validation, and acquiring more data.

Metrics & model evaluation — diagram