Re:Autocomplete from Stack Overflow
by chillacy on Tuesday March 22, 2016 @01:56PM
(#11338475)
Also if you overfit, your code is going to look like:
But at least it passes my unit test suite!
[ Parent
| on HN ]
Just rerun it with a lower target code complexity. You'll know you set it too low when it starts monkey-patching the test framework to avoid actually doing anything.
Re:Autocomplete from Stack Overflow
by Houshalter on Wednesday March 23, 2016 @03:29AM
(#11342697)
This can be avoided by optimizing for the simplest code that works. Checking many cases in multiple lines is always going to be longer and more complex than just a single operation on a single line.
Which is how AIs avoid overfitting, in general, by penalizing complexity.