What machines learn

What do humans think of the machines that think? Applications of AI in pharmaceuticals. 1st part.
May 30, 2021 by
What machines learn
Ympronta srl, Info Ympronta
| No comments yet

Artificial Intelligence has been part of our reality for several years now. Each of us comes into contact with it every day, in a more or less conscious way. Movies suggested by Netflix, the most appropriate advertising on social media, the best route based on traffic.  

But let's face it, unless computing is our business, we vaguely understand how AI actually works. Of course, we can live safely even without this knowledge, simply reaping the rewards and benefits offered by AI. Yet AI is one of the main components of the fourth industrial revolution, and since it pervades all aspects of our life, understanding its fundamental principles can be beneficial for each of us. Especially in the workplace, where sooner or later, in one way or another, everyone will have to take advantage of these tools. 

Can artificial intelligence be strong? Is it possible to train the machine from home? And what do humans think of the machines they think? In this article, we will tell, in simple but concrete terms, what Artificial Intelligence is and we will try to bring even those who are not IT experts closer to this fascinating world.

In questa prima parte parleremo dei concetti teorici e dei problemi tipici che l'IA può aiutarci a risolvere. Nel prossimo articolo vedremo quali possono essere le applicazioni concrete dell'IA nell'industria farmaceutica.

Non c'è nulla di mistico nell'iA

Still, this term is awe-inspiring to many people. Perhaps because we think that we are not allowed to create something intelligent and, by doing so, we risk unleashing the wrath of the gods, even before being overwhelmed by our own creature.

But let us abandon these philosophical doubts to enter into the merits of the question. 

Industrial automation, probably born with the first windmills, is a scientific field that involves the use of technological means and mathematical methods to free man from mechanical work. Not many people are enthusiastic about going to work if it involves the same activities over and over again. Automation is a way of freeing people from this chore so they can move on to doing much more interesting things.

But, if we talk about routine activities, the question arises: what are all these intelligent machines and artificial intellect for? Why can't we simply reduce all activities to basic algorithms, standard procedures, simple sequences of actions? Of course, in the case of simple processes, such as cleaning a line, the actions are few, let's say a dozen. But in the case of something as complex as the entire production of drugs, the variables involved become hundreds or thousands. 

And why does this become a problem, especially with the computing power available today?

In fact, this would also be possible, but at least not very universal. Suppose that a deviation from the standard path (normality in Pharma) has appeared in the process. Instantly thousands of new parameters will appear for you to consider. Not only. Sometimes the processi reali sono talmente complessi that it is not even clear which algorithm represents it. And that's why we need artificial intelligence, as a more precise and detailed tool.  

Even the definition of the objective, in this case, is completely different: there are a lot of data, the relationships between these data are not clear and an algorithm is needed that allows us to detect these relationships. And this is where we can make the analogy between the human brain and neural networks, not for reasoning, but for learning.

Yes, the real focus is precisely on our way of learning: with so many examples, with so many trials and errors. When we fail the first time, we are shown what the correct result is. And this extremely human analogy... works! Self-driving cars, weather forecasts, stock trading, and much more. These are all examples of complex, non-standard, and non-trivial problems, in which massive use is already made of artificial intelligence to make decisions.

But is it possible to go further and teach machines to do creative work? There is an opinion that art and creativity are the only advantages humanity can count on in the competition against Machine Learning, and that creative processes are too difficult to automate. Some might even ask, what do we need intelligent machines for in creativity-based crafts? Well, just think of the inspiration that sometimes struggles to come. In this case, we could get help from the machines to create a draft, a semi-finished product that makes us live an experience or that triggers a spark in us that helps us to complete our work of art. And we are not talking about the future. Already today you will find many paintings, symphonies or books created by artificial intelligence.

But let's go back to our topic and try to understand how this process begins and how we can train a machine.

To become a professional in an area you need to spend at least 10,000 hours. It takes 21 days to develop a habit. To start a new life… you have to start doing it on Monday. Mind for Machine Learning (machine learning, or rather teaching machines) we need three main components:

  • Data

  • Features

  • Algorithms


Do we want to recognize cats? We need pictures of cats. Do we want to recognize spam emails? We need the spam examples. Do we want to understand people's interests? We need to analyze their likes, comments, and shares. And we need a lot of these examples. Tens of thousands would be the bare minimum.  

And it must always be considered that taking spam as an example, those who create spam are well aware of the existence of anti-spam algorithms. For this, he has to invent tricks every day to evade these algorithms. While email providers need to make their algorithms resistant to such attempts.

In the same way, similar algorithms must understand what the interests of users are, and to do this we must first define the concept of interest. Likes, video viewing time, comments, and so on, are all indicators of interest that will be used by Machine Learning algorithms to predict which content will be of interest to you.

But how do you collect the dataSomeone does it directly (after making us accept the conditions of service that provide for the collection of our data). Someone is smart and exploits us as free labor. Just think about when we have to indicate the images that contain a boat, a bike, or a traffic light to prove that we are not robots. Congratulations, at that moment you taught a machine something new. Thanks, Google.

In questo modo hanno digitalizzato le uscite cartacee di New York Times, e di tantissimi libri, che sono tutti disponibili su Google Book Search. Qualcuno vede in questo un atto nobile, qualcuno intravede un parassitismo nascosto. Ma è chiara una cosa fondamentale: senza grandi quantitativi di dati puliti, detti Dataset o Row Data, non può esistere l'Intelligenza Artificiale.


Also called properties or characteristics, or signs, or... features. It can be anything. The model of the car, the user's gender, the price of the shares, the frequency of use of a specific term (for example "Ympronta"). It is very important for the machine to know what it needs to focus on.

It is convenient when the data is already in tabular form. In this case, the names of the columns are just characteristics. By doing this we have made life easier for our machine. This approach is called "Supervised Learning" (or teacher learning). The teacher has already defined all the characteristics of the cats and dogs, points out the images containing the cats and those with the dogs, and the machine learns.

But there are situations when the machine is given a mountain of photos with cats and dogs, and the poor machine tries by itself to find the similarities and differences. This approach is called "unsupervised learning" (without a teacher). In this case, the search for characteristics alone takes much longer than the rest of the learning. Nor is there a guarantee that the end result will be satisfactory. 

In this we begin to glimpse the main problem of artificial intelligence, or its maturity today. A successful "trained" algorithm on a specific Dataset can be useless if applied to completely new data. But it is also true that it is from unsupervised learning that we can derive the greatest benefits. Just think of the increasingly frequent cases when the machine identifies characteristics and relationships that a human could never see or even does not understand them even in the face of evidence.


We go up in difficulty. There is no need to worry, we will also address this part with a simple, understandable ... human approach.

All the tasks that can be performed by machines can be grouped into three main types:

  • Classification

  • Regression

  • Clustering


Socks by color, customers by country, music by gender, dogs by breed, and so on. Classification is the most popular task in all of Machine Learning. And here the machine behaves like a child who has to sort out the little room: the dolls in one box, the robots in the other. 

What if a robot-doll happens?

This is a good time to return an error.

Blue screen of death - Wikipedia


In fact, it is like classification with the difference that we have to predict a valueCost of the used car based on mileage, road trip duration based on mileage, company stock value based on its CEO's tweet. 

In essence, any need to draw a graph falls into this type of problem, a curve that represents the value of something based on something else. Anyone can do it, just a blackboard and a marker. But the machine will do it with mathematical precision.


Like the classification but without knowing the classes in advance. The machine alone looks for similar objects and groups them into clusters. As we said, this is the most difficult but also the most extraordinary task since, not only the machine is capable of processing huge amounts of data, but it can find "hidden" relationships that we humans cannot even imagine. Still, there are. At the extreme point, we can call this type of problem the "Butterfly Effect", when the algorithm is able to analyze millions of apparently independent events and finally identifies a cause-effect relationship in the two distant events, both physically and on the temporal axis. 


Not all problems can be solved with one of the types of algorithms mentioned above. But most of them do. And, of course, there can be so many algorithms that solve the same problem. But it is important to remember the fundamental principle:if the quality of the starting data is not good, even the best algorithm will not be able to help us.

We have therefore clarified the three pillars of Machine Learning and now we give some very important definitions that will help you not to make a bad impression on the experts, asking questions such as "could Machine Learning replace Artificial Intelligence" .