3 ms·
Those are statistics/ML questions, not software development ones, so software development processes like TDD are only tangentially relevant really. But in any
by ploika 6y ago
Those are statistics/ML questions, not software development ones, so software development processes like TDD are only tangentially relevant really.
But in any case, it's actually fairly easy to test that your trained model has sufficient accuracy: choose a metric, choose a threshold for said metric, and check that the observed metric on a testing set (data that the model was not trained on) is above the desired threshold. Repeat for several different metrics for a better understanding of how well the model performs. This can be put in a set of unit tests.
Check residuals, inspect the logical implications of the regression coefficients (or whatever), plot a few curves etc to be more sure again. This can't really be put in unit tests, nor should it be. But again, this is more statistics than software development.
Same goes for model deterioration - every so often you check that the metric(s) still beat the minimum threshold on more recent data.