When to Change Dev/Test Sets (C3W1L07)
Key Takeaways
Determines when to change development and test sets in machine learning
Full Transcript
you've seen how such ever death sets and evaluation metric is like placing a target somewhere for your team to aim at but sometimes partway through a project you might realize you put your target in the wrong place in that case you should move your target let's take a look at an example let's say you built a CAD classifier to try to find lots of pictures of cats to show to your can't loving users and the message if you decide to use is classification error so Avram's a and B have respectively three percent error and five percent error so it seems like Gotham a is doing better but let's say you try out these algorithms you look at these algorithms and album a for some reason is letting through a lot of pornographic images so if you ship algorithm a the users would see more cat images because you know see percent error is identifying cats but it also shows you users some holographic images which is totally unacceptable but for your company as well as for your users and in contrast album B as five percent error so it lists classifies fewer images but it doesn't have pornographic images so from your company's point of view as well as from a user acceptance point of view album B is actually much better algorithm because you know it's not learning through any common graphics images so what's happened in this example is that album a is doing better on the evaluation metric is giving three percent error but is actually worse algorithm so in this case the evaluation metric plus the DEF set it prefers album a because the same look around a has lower error which is the metric is using when you're you and your users prefer a ver and B because it's not learning through Paulo graphics images so when this happens when your evaluation metric is no longer correctly rank ordering preferences between algorithms in this case is miss predicting that album a is a better algorithm then there's a sign that you should change your evaluation metric or perhaps you're on development sets or test set so in this case Dimas classification error metric that you're using can be written as follows as 1 over M a number of examples in your development set of sum from I equals 1 to M and depth number of examples of development set of indicator whether or not the prediction example I a development set is not equal to the actual label I wear this is useless notation to denote about their predictive value right so either 0 and this indicator function notation counts up the number of examples on which you know this thing in sign is true so this formula just counts up the number of misclassifying examples so the problem with this evaluation metric is that they trees pornographic and non pornographic images equally but you really want to conspire to not miss label pornographic images like maybe recognize a pornographic images academician therefore show it to a unsuspecting users therefore very unhappy with you know unexpectedly seeing porn so one way to change this evaluation metric would be if you had a weight term here and we call this WI where WI is going to be equal to 1 in front X I is non porn and maybe 10 or maybe even larger number like 100 if X I is porn so this way you're giving a much larger weight to examples that are pornographic so that the error term goes up much more on the algorithm this makes mistakes on classifying appalling graphics images a cat image and in this example you're giving a 10 times bigger wings to classifying on the graphic images correctly and if you want this normalization constant it will be right technically this becomes sum over I of WI so then this error would still be between 0 on 1 so the details of this weighting aren't important and actually influences waiting you need to actually go through your def in 10 sets to label the poly graphic images in your def and test sets you can implement this weighting function but a high level takeaway is if you find that you valuation metric is not giving the correct rank order preference for what is actually better algorithm then that's a time to think about defining a new evaluation metric that you know and this is just one possible way that you could define an evaluation metric and the goal of the evaluation metric is to accurately tell you give in to class size which one is better for your application for the purpose of this video don't worry too much about the details of how we define a new error metric the point is that if you're not satisfied with your own error metric then don't keep coasting with an error metric you're unsatisfied with is that try to define a new one that you think better captures your preferences in terms of what's actually a better algorithm one thing you might notice is that so far we've only talked about how to define a metric to evaluate classifiers that is what defines an evaluation metric that helps us better rank all their classifiers when they are performing at varying levels in terms of streaming out porn and this is actually an example of a full realization where I think you should take a machine learning problem and break it into distinct steps so one knob or one step is to figure out how to define a metric they captures what you want to do and I will is separately about how to actually do well on this metric so I think of the machine learning tasks as two distinct steps to use the target analogy the first step is to place the target so define where you want to aim and then it's a completely separate step so this is one knife you could tune which is how do you place the target and it's completely separate problem think of it as a separate knob to tune in terms of how to do well at a target or how to you know aim accurately or how to shoot at the target and so defining a metric is step one and you do something else for step two so in terms of shooting the target maybe your learning algorithm is optimizing some cost function that looks like this are you minimizing this you know some losses on your training set so one thing you could do is to also modify this in order to incorporate these weights and maybe you end up changing this normalization constant as well suggest one over sum of WI between the details of how you define J is important but the point was with the philosophy for formalization think of placing the target that's one step and aiming and shooting the target as a distinct step which you do separately so so in other words I encourage you to think of defining the metrics as one step and then you can and only after you've defined in metric figure out how to do well on that metric which might be changing the cost function J that your network is optimizing but for going on let's look at just one more example let's say that you're two cat classifiers a and B have respectively 3 percent error and 5 percent error as evaluated on your death set or maybe even on your test set which are images downloaded off the internet so high quality well frame images but maybe we need to tour your album a product you find that averin B actually looks like it's performing better even though it's doing better or your death set and you find that you've been training off very nice high quality images download without the internet but when you deploy this on a mobile app users are uploading all sorts of pictures much less trained you're going public the Catholic has twenty fish expressions maybe images are much blurrier and when you test out your algorithms you find that a from B is actually doing better so this would be another example of your metrics and depth test set falling down and the problem is that you're evaluating on a different test set a very nice high resolution well fairing images but what your users really care about is the album doing well on images they're uploading which are maybe less professional shots and blurrier and less wall frames so the guideline is they're doing well on your metrics and your current deficit or different test sets distribution if that does not correspond to doing well on the application you actually care about then change your metrics and/or your depth test set so in other words you can discover that your dev test set has these very high quality images but evaluating on this dev test set is not predictive of how well your app actually performs because you asked me to view of lower quality images then that's a good time to change your dev test set so that your data better reflects the type of data you actually need to do well on but your vote guideline is really if your current metrics and data and your validating on doesn't correspond to do well and what you actually care about and change your metric and/or your depth test set submit to capture what you need the album to actually do well on having the evaluation metrics and the death set allows you to much more quickly make decisions about this album a or ever be better so it really speeds up how quickly you or your team can iterate so my recommendation is even if you can't define the perfect evaluation metric and DEF set just set something up quickly and use that to drive the speed of your team iterating and then later down the line you find out that it wasn't a good one you're a better idea change it at that time it's perfectly okay but what I recommend it so most teams is to run for too long without an evaluation metric and depth set because that can slow down the efficiency or who should team can iterate and improve your algorithm so that's it on when to change your evaluation measures and/or depth and test sets hope that these guidelines help you serve your whole team to have a well-defined target you can iterate efficiently towards improving performance on
Original Description
Take the Deep Learning Specialization: http://bit.ly/39ufNQm
Check out all our courses: https://www.deeplearning.ai
Subscribe to The Batch, our weekly newsletter: https://www.deeplearning.ai/thebatch
Follow us:
Twitter: https://twitter.com/deeplearningai_
Facebook: https://www.facebook.com/deeplearningHQ/
Linkedin: https://www.linkedin.com/company/deeplearningai
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from DeepLearningAI · DeepLearningAI · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Forward and Backward Propagation (C1W4L06)
DeepLearningAI
deeplearning.ai's Heroes of Deep Learning: Yuanqing Lin
DeepLearningAI
deeplearning.ai's Heroes of Deep Learning: Ruslan Salakhutdinov
DeepLearningAI
deeplearning.ai's Heroes of Deep Learning: Yoshua Bengio
DeepLearningAI
deeplearning.ai's Heroes of Deep Learning: Pieter Abbeel
DeepLearningAI
deeplearning.ai's Heroes of Deep Learning: Ian Goodfellow
DeepLearningAI
deeplearning.ai's Heroes of Deep Learning: Andrej Karpathy
DeepLearningAI
Using an Appropriate Scale (C2W3L02)
DeepLearningAI
Gradient Checking (C2W1L13)
DeepLearningAI
Gradient Checking Implementation Notes (C2W1L14)
DeepLearningAI
Learning Rate Decay (C2W2L09)
DeepLearningAI
Understanding Mini-Batch Gradient Dexcent (C2W2L02)
DeepLearningAI
Mini Batch Gradient Descent (C2W2L01)
DeepLearningAI
The Problem of Local Optima (C2W3L10)
DeepLearningAI
Exponentially Weighted Averages (C2W2L03)
DeepLearningAI
Tuning Process (C2W3L01)
DeepLearningAI
Understanding Exponentially Weighted Averages (C2W2L04)
DeepLearningAI
Bias Correction of Exponentially Weighted Averages (C2W2L05)
DeepLearningAI
Gradient Descent With Momentum (C2W2L06)
DeepLearningAI
Normalizing Activations in a Network (C2W3L04)
DeepLearningAI
Hyperparameter Tuning in Practice (C2W3L03)
DeepLearningAI
Adam Optimization Algorithm (C2W2L08)
DeepLearningAI
RMSProp (C2W2L07)
DeepLearningAI
Fitting Batch Norm Into Neural Networks (C2W3L05)
DeepLearningAI
Why Does Batch Norm Work? (C2W3L06)
DeepLearningAI
Batch Norm At Test Time (C2W3L07)
DeepLearningAI
Softmax Regression (C2W3L08)
DeepLearningAI
Deep Learning Frameworks (C2W3L10)
DeepLearningAI
Neural Network Overview (C1W3L01)
DeepLearningAI
Training Softmax Classifier (C2W3L09)
DeepLearningAI
Why Deep Representations? (C1W4L04)
DeepLearningAI
Gradient Descent For Neural Networks (C1W3L09)
DeepLearningAI
Neural Network Representations (C1W3L02)
DeepLearningAI
TensorFlow (C2W3L11)
DeepLearningAI
Activation Functions (C1W3L06)
DeepLearningAI
Explanation For Vectorized Implementation (C1W3L05)
DeepLearningAI
Getting Matrix Dimensions Right (C1W4L03)
DeepLearningAI
Understanding Dropout (C2W1L07)
DeepLearningAI
Building Blocks of a Deep Neural Network (C1W4L05)
DeepLearningAI
Why Non-linear Activation Functions (C1W3L07)
DeepLearningAI
Computing Neural Network Output (C1W3L03)
DeepLearningAI
Backpropagation Intuition (C1W3L10)
DeepLearningAI
Train/Dev/Test Sets (C2W1L01)
DeepLearningAI
Deep L-Layer Neural Network (C1W4L01)
DeepLearningAI
Random Initialization (C1W3L11)
DeepLearningAI
Other Regularization Methods (C2W1L08)
DeepLearningAI
Normalizing Inputs (C2W1L09)
DeepLearningAI
Derivatives Of Activation Functions (C1W3L08)
DeepLearningAI
Parameters vs Hyperparameters (C1W4L07)
DeepLearningAI
Vectorizing Across Multiple Examples (C1W3L04)
DeepLearningAI
What does this have to do with the brain? (C1W4L08)
DeepLearningAI
Dropout Regularization (C2W1L06)
DeepLearningAI
Vanishing/Exploding Gradients (C2W1L10)
DeepLearningAI
Basic Recipe for Machine Learning (C2W1L03)
DeepLearningAI
Bias/Variance (C2W1L02)
DeepLearningAI
Forward Propagation in a Deep Network (C1W4L02)
DeepLearningAI
Weight Initialization in a Deep Network (C2W1L11)
DeepLearningAI
Numerical Approximations of Gradients (C2W1L12)
DeepLearningAI
Regularization (C2W1L04)
DeepLearningAI
Why Regularization Reduces Overfitting (C2W1L05)
DeepLearningAI
More on: ML Maths Basics
View skill →Related Reads
📰
📰
📰
📰
Seeing Pictures the Way a Clustering Algorithm Does: Image Segmentation with K-Means, GMMs, and…
Medium · Data Science
How to Crush FAANG Coding Interviews in 3 Months: The Neo Way
Dev.to · Timevolt
Logistic Regression: Formulation
Dev.to · Ethan Davis
Getting Started with Docling!
Medium · Machine Learning
🎓
Tutor Explanation
DeepCamp AI