There are hundreds, if not thousands, of algorithms and statistical methods.
When I first started in this field, the first method I tried in every single dataset was K-means. It was my go-to algorithm.
In the first few attempts, I quickly realized what Wolpert and Macready wrote about in 1997. They mathematically proved what I was suspecting. There was no one-size-fits-all algorithm.
Their influential work was called the no-free-lunch theorem (NFL).
Understanding the Theorem
Wolpert and Macready define the general-purpose optimization algorithms in terms of the understanding between how well an algorithm a performs and the optimization problem f on which it runs.
In their paper, they pose several questions related to the best matching algorithms to problems.
The NFL Theorem
Without getting into the mathematical nitty-gritty, this is what the NFL theorem implies:
If algorithm a can outperform algorithm b, then there are other functions where b will outperform a.
The conclusion showed that random algorithms perform differently depending on the problem and the functions required. This concludes that some algorithms are better than others when solving a particular set of problems.
The paper also highlights the importance of incorporating problem-specific knowledge into the algorithm’s behavior.
Take a dataset used for customer segmentation. You might find that K-means (a) performs very well in helping you understand your customers, let’s call it problem 1.
Now, let’s say that you have a similar dataset, but you are trying to do a sales forecast, problem 2. The same a algorithm that you used for problem 1 doesn’t perform well. However, a Decision Tree (b) will perform very well in the dataset.
Conclusion
The idea that one algorithm is better than another is false. The performance highly depends on the set of problems you are working on.
In data science, it is highly dependent on the dataset at hand. Even when they are statistically similar.
The NFL Theorem taught me that there isn’t a one-size-fits-all algorithm. My approach has drastically changed since.
Comments (0)
Leave a Comment
No comments yet. Be the first to comment!