当你接手了一个有关深度学习项目,教你如何来开展工作的一个流程,Deep Learning Project Workflow, 本文试图从2016年深度学习暑期学校的“Nuts and Bolts of Applying Deep Learning”演讲中总结Andrew Ng的推荐机器学习工作流程。
This document attempts to summarize Andrew Ng's recommended machine learning workflow from his "Nuts and Bolts of Applying Deep Learning" talk at Deep Learning Summer School 2016. Any errors or misinterpretations are my own.
Start Here
Measure Human-level performance on your task (More)
Do your training and test data come from the same distribution?
The real goal of measuring human-level performance is to estimate the Bayes Error Rate. Knowing your Bayes Error Rate helps you figure out if your model is underfitting or overfitting your training data. More specifically, it will let us measure 'Bias' (as Ng defines it), which we use later in the workflow.
If Your Training and Test Data Are From the Same Distribution
1. Shuffle and split your data into Train / Dev / Test Sets
Ng recommends a Train / Dev / Test split of approximately 70% / 15% / 15%.
2. Measure Your Training Error and Dev Set Error, and Calculate Bias and Variance
If Your Training and Test Data Are Not From the Same Distribution
1. Split Your Data
If your train and test data come from different distributions, make sure at least your dev and test sets are from the same distribution. You can do this by taking your test set and using half as dev and half as test.
Carve out a small portion of your training set (call this Train-Dev) and split your Test data into Dev and Test:
|---------------------------------|-----------------------|
| Train (Distribution 1) | Test (Distribution 2) |
|---------------------------------|-----------------------|
| Train | Train-Dev | Dev | Test |
|---------------------------------|-----------------------|
2. Measure Your Errors, and Calculate the Relevant Metrics
Calculate these metrics to help know where to focus your efforts: