Test-driven development for machine learning modeling
One approach to reducing the risks of developing unreliable models and pushing them to production is test-driven development. We aim to design unit tests (that is, tests designed to test individual components of software) that reduce the risks of code revision either within the same or in different life cycles. To better understand this concept, we need to understand what unit tests are and how we can design and use them in Python.
Unit testing
Unit tests are designed to test the smallest components, or units, in the code and software we design. In machine learning modeling, we might have many modules taking care of different steps of a machine learning life cycle, such as data curation and wrangling or model evaluation. Unit tests help us avoid errors and mistakes, and design our code without the need to worry about whether we made a mistake that will not be detected early on. Detecting issues in our code early has lower...