Source Metadata
Original cangjie-skill frontmatter from the distillation run:
id: f10
title: "ML项目流程 — 收集→训练→部署→迭代"
book: "AI for Everyone"
author: "Andrew Ng(吴恩达)"
source: p11, p16
tags: [machine-learning, workflow, project-management]
related_skills:
- slug: ab-mapping
relation: depends-on
- slug: train-test-split
relation: depends-on
- slug: iterate-not-perfect
relation: depends-on
- slug: ml-vs-ds
relation: contrasts-with
R — Reading (original quote)
"The key steps of a machine learning project are to collect data, train a model, establish an A-to-B mapping relationship, and then deploy the model" — p11
I — Interpretation (restate in your own words)
A machine learning project follows a four-stage workflow, the core of which is alooprather than a linear process:
- Collect labeled data: Prepare (A, B) paired data—A is the input (such as speech or images), and B is the desired output (such as the text "Alexa" or an object label).
- Train the model: Let the algorithm learn the A→B mapping relationship from the data.Expect multiple iterations, and the first attempt almost always fails.
- Deploy the model: Push the trained model to real users and run it in a real environment.
- Iterate and optimize: After deployment, collect feedback data (especially failure cases), add it to the training data, and retrain.
Key insight: This is aclosed loop—deployment generates new data, new data makes the model better, and a better model generates more usage and data.
A1 — Past Application (past application cases)
- Alexa wake word detection: Collect a large number of "Alexa" recordings → train a wake detection model → deploy to devices → discover that British accents fail to be recognized → collect British accent data → retrain → accuracy improves.
- Autonomous vehicle detection: Collect road images → train a vehicle detection model → deploy to test vehicles → discover that golf carts are not recognized → collect golf cart images → retrain → the model becomes more robust.
A2 — Future Trigger (future trigger conditions)
Trigger scenarios:
- The team has just started an ML project and does not know where to begin
- After training the model, they do not know what to do next
- After deployment, they find the results are poor and want to know how to improve
Language signals:
- "How do you do an ML project?"
- "What are the steps of a machine learning project?"
- "How do you advance an AI project?"
- "What is the project workflow?"
- "What should be done next?"
- "What should be done after deployment?"
Distinguishing point: Use this framework when you are facing a project that requires "building and running a system that can continuously make predictions."
E — Execution (execution steps)
- Collect labeled training data: Prepare a large number of (A, B) paired samples and ensure data quality.
- Train the model and iterate: Train the model with the training set, evaluate it on the test set, and repeatedly adjust until it reaches a predetermined metric (such as 95% accuracy).
- Deploy to real users: Integrate the model into a product/service so that real users can use it.
- Monitor and collect failure cases: Record the mistakes the model makes in real-world scenarios, and add these failure cases to the training data.
- Retrain: Retrain the model with the expanded data to continuously improve performance.
Completion criteria: The model has been deployed to real users, and a continuous iteration mechanism of "collect failure cases → retrain" has been established.
B — Boundary (usage boundaries)
Not applicable scenarios:
- Data science projects (the output is a report rather than software, and the process is different)
- One-off analysis tasks (no deployment or iteration needed)
- Situations with no deployment channel (the model cannot reach users)
Failure modes:
- Focusing excessively on the amount of training data while ignoring data quality
- Failing to establish a feedback loop after deployment, so the model cannot continuously improve
- Expecting success with a single training run and giving up when setbacks occur
Author's blind spots:
- Andrew Ng underestimated the difficulty of the "last mile"—integrating a model into an existing system is often harder than training the model itself. The engineering workload in the deployment phase (API design, latency optimization, A/B testing, canary releases) may account for more than 50% of the entire project's workload, but the book says little about this.
Related skills
- ab-mapping (depends-on): The prerequisite for the ML workflow is that clear inputs and outputs have already been defined through the A→B mapping
- train-test-split (depends-on): The training phase requires using a training/test set split to evaluate the model's generalization ability
- iterate-not-perfect (depends-on): After deployment, an iteration mechanism of "collect failure cases → retrain" needs to be established
- ml-vs-ds (contrasts-with): The ML workflow is suitable for "building systems" projects, while DS projects produce reports rather than software