If you are familiar with the world of Machine Learning, you better be aware of the great
Andrew Ng, who revolutionized the educational era with his exceptional teachings and researches in the field of AI, ML, NLP and more. I recently got a chance to read this book “Machine Learning Yearning” by him, which shows the technical strategy of AI Engineers in the era of deep learning.
It is divided into various segments, focusing on each aspects of model building and selection of right kind of data. Also, after each section, author has written a bonus chapter of “takeaways” as a summary of the topic, which will surely help budding team members to revise the important findings. I really appreciate the way Andrew has explained with very basic examples of simple model building, clarifies all the problems while choosing correct kind of data, how to bifurcate them, how to balance the evaluation metrics, and how to decide the optimized approach. Any beginner in Machine Learning can follow the details along very easily.
Following are the 15 major points which I find helpful:
- The book starts with the need of fashioning training and test sets of real world, and how it can be segregated with respect to abundant of distribution patterns. How even 0.01% of improvement in the performance can boost the moral of developer, it all depends on the size of data and fairly it has been distributed, but at the same time he stated that “there is no need to have excessively large dev/test sets beyond what is needed to evaluate the performance of your algorithms”.
- The importance of evaluation metric to be optimized is clearly shown through various examples.
There’s no shame in changing the dev/test set or even the metric, if the classifiers are leading the the project in wrong directions, and unnecessarily wasting the time of efficient team.
- Don’t start off trying to design and build the perfect system. Instead, build and train a basic system quickly and work on the iteration part to make the model better at each step. Two hours of manual work on error analysis can save you a month of wasted effort, as it provides a quantitative basis on which to decide whether to make the investment of choosing right thing.
- Error analysis does not produce a rigid mathematical formula that tells you what the highest priority task should be. You also have to take into account how much progress you expect to make on different categories and the amount of work needed to tackle each one.
- Consider splitting the dev set into an Eyeball dev set, which you will manually examine, and a Blackbox dev set, which you will not manually examine. If performance on the Eyeball dev set is much better than the Blackbox dev set, you have overfit the Eyeball dev set and should consider acquiring more data for it.
- Implement practical techniques to balance the trade-off between variance and bias.
- Try to resolve the noise in training curve by either train randomly chosen training set by sampling with replacement from original set, or choose a ‘balanced’ subset.
- Progress is usually slower on problems where machines already surpass human-level performance, while progress is faster when machines are still trying to catch up to humans.
- The clear picture of how to decide whether to use all or your data or include inconsistent data is stated by minor facts of various common models like cat detection, prediction of house prices etc.
- When synthesizing data, put some thought into whether you’re really synthesizing a representative set of examples. Try to avoid giving the synthesized data properties that makes it possible for a learning algorithm to distinguish synthesized from non-synthesized examples.
- Even though end-to-end learning has seen many successes, it is not always the best approach
- The examples of choosing pipeline components are more clearer by the statement — If you are able to take a complex task, and break it down into simpler sub-tasks, then by coding in the steps of the sub-tasks explicitly, you are giving the algorithm prior knowledge that can help it learn a task more efficiently.
- When you have the right (input, output) labeled pairs, you can sometimes learn end-to-end even when the output is a sentence, an image, audio, or other outputs that are richer than a single number.
- What if each individual component of your ML pipeline is performing at human-level performance or near-human-level performance, but the overall pipeline falls far short of human-level? This usually means that the pipeline is flawed and needs to be redesigned. Error analysis can also help you understand if you need to redesign your pipeline.
So, don’t just stick to these summary of the whole book but read the entire book to build a better team, and of course model.