Deeplearning - Ai Deeplearning - Ai
Deeplearning - Ai Deeplearning - Ai
Deeplearning - Ai Deeplearning - Ai
DeepLearning.AI makes these slides available for educational purposes. You may not use or distribute
these slides for commercial purposes. You may make copies of these slides and use or distribute them for
educational purposes as long as you cite DeepLearning.AI as the source of the slides.
Why ML
deeplearning.ai
Strategy?
Motivating example
Ideas:
• Collect more data • Try dropout
• Collect more diverse training set • Add !" regularization
• Train algorithm longer with gradient descent • Network architecture
• Try Adam instead of gradient descent • Activation functions
• Try bigger network • # hidden units
• Try smaller network • … Andrew Ng
Introduction to
ML strategy
Orthogonalization
deeplearning.ai
TV tuning example
Car
Andrew Ng
Chain of assumptions in ML
Andrew Ng
Setting up
your goal
Single number
deeplearning.ai
evaluation metric
Using a single number evaluation metric
Idea
Andrew Ng
Another example
Andrew Ng
Setting up
your goal
Satisficing and
deeplearning.ai
optimizing metrics
Another cat classification example
Classifier Accuracy Running time
A 90% 80ms
B 92% 95ms
C 95% 1,500ms
Andrew Ng
Setting up
your goal
Train/dev/test
deeplearning.ai
distributions
Cat classification dev/test sets
Regions:
• US
• UK
• Other Europe
• South America
• India
Idea
• China
• Other Asia
• Australia
Experiment Code
Andrew Ng
True story (details changed)
Andrew Ng
Guideline
Andrew Ng
Setting up
your goal
Size of dev
deeplearning.ai
and test sets
Old way of splitting data
Andrew Ng
Size of dev set
Set your dev set to be big enough to detect differences in
algorithm/models you’re trying out.
Andrew Ng
Size of test set
Set your test set to be big enough to give high confidence
in the overall performance of your system.
Andrew Ng
Setting up
your goal
When to change
deeplearning.ai dev/test sets and
metrics
Cat dataset examples
Andrew Ng
Orthogonalization for cat pictures: anti-porn
Andrew Ng
Another example
Algorithm A: 3% error
Algorithm B: 5% error
Dev/test User images
Andrew Ng
Comparing to human-
level performance
Why human-level
deeplearning.ai
performance?
Comparing to human-level performance
accuracy
time
Andrew Ng
Why compare to human-level performance
Humans are quite good at a lot of tasks. So long as
ML is worse than humans, you can:
- Get labeled data from humans.
Andrew Ng
Comparing to human-
level performance
Avoidable bias
deeplearning.ai
Bias and Variance
Andrew Ng
Bias and Variance
Cat classification
Andrew Ng
Cat classification example
Training error 8% 8%
Dev error 10% 10 %
Andrew Ng
Comparing to human-
level performance
Understanding
deeplearning.ai human-level
performance
Human-level error as a proxy for Bayes error
Medical image classification example:
Suppose:
(a) Typical human ………………. 3 % error
Training error
Dev error
Andrew Ng
Summary of bias/variance with human-level
performance
Human-level error
Training error
Dev error
Andrew Ng
Comparing to human-
level performance
Surpassing human-
deeplearning.ai
level performance
Surpassing human-level performance
Team of humans
One human
Training error
Dev error
Andrew Ng
Problems where ML significantly surpasses
human-level performance
- Online advertising
- Product recommendations
- Loan approvals
Andrew Ng
Comparing to human-
level performance
Andrew Ng
Reducing (avoidable) bias and variance
More data
Dev error Regularization
NN architecture/hyperparameters search
Andrew Ng