Machine Learning Models

What type of Machine Learning model is best?

It depends … they all work and none of them work!

Reading Time: 4 minutes

Post published on 20/01/2021 by Donata Petrelli and released with licenza CC BY-NC-ND 3.0 IT (Creative Common – Attribuzione – Non commerciale – Non opere derivate 3.0 Italia)

Title Image credits by Fil Mazzarino on Unsplash

Is CNN or RNN better?

I often get requests for advice about AI. In particular, many people ask me whether a certain algorithm is better than another.

The question is very interesting but the answer is also very complex especially because, in my opinion, there isn’t one!

At the same time giving the person concerned, who in the meantime is anxiously waiting for the solution, a synthetic answer would mean having to say “According to my experience A is better than B or C” … and this is very simplistic, I would say useless if not damaging.

Well, for all those who are wondering in their hearts which machine learning model to use for a certain application or which programming language is more effective to implement it, I thought to tell this story …

If you like, I invite you to read it

Once upon a time

Cute, isn’t it! I’ve always loved stories, and every self-respecting story starts like this, with: once upon a time!

Anyway… let’s start at the beginning.

From a very young age, we have had to deal with very heavy challenges. Think of the first goals we had to achieve: learning to walk, to talk, to eat, to dress ourselves….

All activities that now seem very simple but when compared to the age of a child of a few months are very difficult.

Through the observation of a behavioral model, the result was eventually achieved. However, everyone has followed his own path, in technical jargon we could say his own learning algorithm. There are those who first learned to crawl and those who, instead, immediately stood on two feet. There was no right or wrong rule. Eventually we had to know how to walk.

The learning times also differ, some learned at 9 months, some at 12, … and also how the goal was achieved. Who walks immediately and who falls several times. A even when we fall, those who get up immediately on their own and those who want help from an adult. In the end however we get to walk alone.

Then comes the time or need to learn to jump, run. Okay, it’s time to perfect the model. More motor activity concepts need to be learned. Coordinating the body, staying in balance are some of the new levels to be achieved.

So the model does new training to achieve the goal: learning to run. And once again we succeed, each at his own time and performing differently. Who gets to run at the Olympics and who instead on a treadmill in the gym 🙂

The evolutionary model of learning just described is what happens to our application models.

So what solution to adopt?

In front of a contingent problem, all of us are inclined to look for the simplest solution and above all the definitive one. It would certainly be nice if this were the case. We won’t waste so much time and we can immediately take advantage of the solution.

As in the previous example, the only certainty is the goal, that is to learn first to walk then to run, its achievement is different from case to case, both for the timing and the technical choices to be implemented.

Even in the work context it works like this.

Answering what is the best solution for an application, such as whether a decision tree or a Bayesian classifier is more effective for a predictive model, requires an analysis so thorough as to be worthy of writing a new book J

Both solutions are theoretically good for the purpose but which one to choose, if one or the other or even a third, depends on a series of variables and parameters to be necessarily taken into account and that can lead to solutions even diametrically opposed!

As every good principle of Project Management teaches us, we must also take into account the context, resources and time. If you want to deepen the topic I recommend reading an interesting article by my friend Fabrizio Cesarini (The Triangle of Quality).

All implementation models start from data. Depending on the type, structure and size of data, we can decide for one technique over another.

This is also true for resources. The computational power required may be the limitation that leads us to discard an algorithm and choose one perhaps less suitable for the solution. Algorithms that are more effective at solving a problem may have to be discarded due to processing time.

Finally, the application context. Every choice must be taken in relation to the nature of the problem, to the environment in which it is contextualized and in relation to its evolution in the time. A solution could be the most suitable at the moment but lose its value in the future for the refinement, the development and the optimization of the model.

In all of this, we cannot forget the complexity factor.

In fact, the concept seems to assume that there is only one technology that can solve the problem, but I tend to have a different approach. Often in fact the best solution is given by a mix of technologies, each dedicated to the solution of a single task of the problem and that together give the optimal result. I’ve talked about this in this previous article that you can read to learn more.

Conclusion

In the end, there is no algorithm that is the panacea for all problems. It doesn’t work that way in practice.

In my professional career I have carried out projects even in very different contexts. There was no one recipe that fit all! I approached each one with different technical solutions specific to the case and purpose.

You have to spend the necessary time to analyze the solution, do some tests and arrive at the optimal solution in steps. Machine Learning also learns from mistakes … we like to call it experience 🙂

What do you think? How do you approach this important choice in your work?

What type of Machine Learning model is best?
Scroll to top

Donata Petrelli - Data Scientist in Tacchi Alti - Iscriviti alla mia Newsletter Gratuita

Donata Petrelli