Examples on how to test machine learning code. We'll test a numpy
implementation of DecisionTree and RandomForest, covering some standard software tests, model tests, and model evaluation.
Inspired by @jeremyjordan's Effective Testing for Machine Learning Systems; follow-up article on 2020-09-06 @ eugeneyan.com.
# Clone and setup environment
git clone git@github.com:eugeneyan/testing-ml.git
cd testing-ml
make setup
# Run test suite
make check
-
Pre-train tests
-
Post-train tests
- Evaluation on train-test split