We use Machine Learning for problems that traditional programming can’t solve.
In other words, we use Machine Learning for problems in which we can’t infer a logical sequence of steps or rules to solve the problem.
For example, let’s say that we want to build a program to recognize the fruit contained in a picture. We may try to set some simple rules to identify an apple from its characteristics: red and rounded.
However, cherries are also red and rounded, and then this program would recognize cherries as apples.
As human beings, we also don’t use any set of rules to recognize fruits. We know by intuition. We know that an apple is an apple and how different it is from a cherry. We learn that by example.
Thus, whenever we can’t set clear rules to solve a problem, we should try to simulate human intuition. Then, using a dataset with examples of inputs and the expected outputs, we can apply Machine Learning algorithms to them and learn by example.