Machine Learning for Quality Control