← Index
Source: docs/zsub/know/checklist.md (auto-generated by scripts/generate-docs-html.mjs — edit the .md, not this file)

Machine Learning Project Checklist

This checklist can guide you through your Machine Learning projects. There are eight main steps:

  1. Frame the problem and look at the big picture.
  2. Get the data.
  3. Explore the data to gain insights.
  4. Prepare the data to better expose the underlying data patterns to Machine Learning algorithms.
  5. Explore many different models and short-list the best ones.
  6. Fine-tune your models and combine them into a great solution.
  7. Present your solution.
  8. Launch, monitor, and maintain your system. Obviously, you should feel free to adapt this checklist to your needs.

1. Frame the Problem and Look at the Big Picture

  1. Define the objective in business terms.
  2. How will your solution be used?
  3. What are the current solutions/workarounds (if any)?
  4. How should you frame this problem (supervised/unsupervised, online/offline, etc.)?
  5. How should performance be measured?
  6. Is the performance measure aligned with the business objective?
  7. What would be the minimum performance needed to reach the business objective?
  8. What are comparable problems? Can you reuse experience or tools?
  9. Is human expertise available?
  10. How would you solve the problem manually?
  11. List the assumptions you (or others) have made so far.
  12. Verify assumptions if possible.

2. Get the Data

Note: automate as much as possible so you can easily get fresh data.
  1. List the data you need and how much you need.
  2. Find and document where you can get that data.
  3. Check how much space it will take.
  4. Check legal obligations, and get authorization if necessary.
  5. Get access authorizations.
  6. Create a workspace (with enough storage space).
  7. Get the data.
  8. Convert the data to a format you can easily manipulate (without changing the data itself).
  9. Ensure sensitive information is deleted or protected (e.g., anonymized).
  10. Check the size and type of data (time series, sample, geographical, etc.).
  11. Sample a test set, put it aside, and never look at it (no data snooping!).

3. Explore the Data

Note: try to get insights from a field expert for these steps.
  1. Create a copy of the data for exploration (sampling it down to a manageable size if necessary).
  2. Create a Jupyter notebook to keep a record of your data exploration.
  3. Study each attribute and its characteristics:
  1. For supervised learning tasks, identify the target attribute(s).
  2. Visualize the data.
  3. Study the correlations between attributes.
  4. Study how you would solve the problem manually.
  5. Identify the promising transformations you may want to apply.
  6. Identify extra data that would be useful (go back to “Get the Data”).
  7. Document what you have learned.

4. Prepare the Data

Notes:
- Work on copies of the data (keep the original dataset intact).
- Write functions for all data transformations you apply, for five reasons:
    - So you can easily prepare the data the next time you get a fresh dataset
    - So you can apply these transformations in future projects
    - To clean and prepare the test set
    - To clean and prepare new data instances once your solution is live
    - To make it easy to treat your preparation choices as hyperparameters
  1. Data cleaning:
  1. Feature selection (optional):
  1. Feature engineering, where appropriate:
  1. Feature scaling: standardize or normalize features.

5. Short-List Promising Models

Notes:
- If the data is huge, you may want to sample smaller training sets 
so you can train many different models in a reasonable time (be aware 
that this penalizes complex models such as large neural nets or Random Forests).
- Once again, try to automate these steps as much as possible.
  1. Train many quick and dirty models from different categories (e.g., linear, naive Bayes, SVM, Random Forests, neural net, etc.) using standard parameters.
  2. Measure and compare their performance.
  1. Analyze the most significant variables for each algorithm.
  2. Analyze the types of errors the models make.
  1. Have a quick round of feature selection and engineering.
  2. Have one or two more quick iterations of the five previous steps.
  3. Short-list the top three to five most promising models, preferring models that make different types of errors.

6. Fine-Tune the System

Notes:
- You will want to use as much data as possible for this step, 
especially as you move toward the end of fine-tuning.
- As always automate what you can.
  1. Fine-tune the hyperparameters using cross-validation.
  1. Try Ensemble methods. Combining your best models will often perform better than running them individually.
  2. Once you are confident about your final model, measure its performance on the test set to estimate the generalization error.

WARNING: Don’t tweak your model after measuring the generalization error: you would just start overfitting the test set.

7. Present Your Solution

  1. Document what you have done.
  2. Create a nice presentation.
  1. Explain why your solution achieves the business objective.
  2. Don’t forget to present interesting points you noticed along the way.
  1. Ensure your key findings are communicated through beautiful visualizations or easy-to-remember statements (e.g., “the median income is the number-one predictor of housing prices”).

8. Launch!

  1. Get your solution ready for production (plug into production data inputs, write unit tests, etc.).
  2. Write monitoring code to check your system’s live performance at regular intervals and trigger alerts when it drops.
  1. Retrain your models on a regular basis on fresh data (automate as much as possible).

<1> “Practical Bayesian Optimization of Machine Learning Algorithms,” J. Snoek, H. Larochelle, R. Adams (2012).

Appendix B. Machine Learning Project Checklist from Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems 1st Edition