Computing Library › Machine Learning
Machine Learning

Model Selection and the No Free Lunch Theorem

No single algorithm wins everywhere; model selection compares candidates fairly to find the best fit for a given problem.

No free lunch

The no free lunch theorem states that, averaged over all possible problems, every learning algorithm performs the same. There is no universally best model. Any method's advantage comes from assumptions that happen to match the structure of a particular problem. This is why model selection is empirical: you must test candidates on your data.

What to compare

Kronos motion — lego machine

How to compare fairly

Evaluate every candidate the same way, with cross-validation on the training data and a single metric aligned to the goal. Tune each model's hyperparameters before comparing, or you compare a tuned model against an untuned one. Keep the test set untouched until the final choice is made.

Beyond raw accuracy

A pragmatic rule

Start simple, establish a baseline, and add complexity only when it earns its keep on held-out data. A simple model that is understood and maintainable often beats a marginally more accurate one that no one can debug. The no free lunch theorem is a reminder to let evidence, not fashion, pick the model.