Normally a computer performs a task by following all the instructions of the software step by step. But for complex and large amounts of data, it is impossible to define the correct action in every situation. Consider, for example, autonomous cars where this would mean that every traffic situation must be recognized and the correct action must be recorded in advance. Machine learning offers a way to examine large amounts of data for patterns and to generate a code with which you can recognize those patterns in new data.
How does machine learning work: training algorithms
Machine learning has been developed based on the ability to use computers to examine data for patterns, even if we have no theory of what those patterns look like. With machine learning, the algorithms are therefore trained instead of written. During training, an algorithm is provided with data (the input) and independently searches for a way to arrive at a correct answer (the output). Machine learning applies statistical techniques in the search for the best pattern. Think of (linear) regression, together with more complex approaches. It then generates a code that can recognize that pattern. This generated code is referred to as a model. A model is therefore code; it is the implementation of a pattern recognition algorithm, for example to determine whether a credit card transaction is fraudulent.
How does machine learning work: an example
We will explain how the model comes about with an example. You can consider house prices as a stew with the number of bedrooms, the area and the surroundings as ingredients. If you could figure out how much each ingredient affects the final price, there might be an exact ratio of ingredients to make up the final price. In machine learning, those are the weights. If we could calculate the perfect weights that work for each house, our model could predict house prices. We estimate the comparison for a line that fits all house data.
Text continues below the image.
How does machine learning work: different models
For example, one kind of algorithm is a classification algorithm, with which data is divided into different groups. The same classification algorithm used to recognize handwritten numbers can also be used to classify emails as spam without changing anything. It is the same algorithm, but it is fed with different training data, so that it comes up with a different model.
How does machine learning work: predictions
The model can then extend the found pattern to make predictions. In practice, new data will often be added so that the model can adjust its prediction. Imagine giving a computer a training set with photos, some of which are labeled with cats and others not. After the training you can show the computer a series of new photos and it starts to identify which photos contain cats. Machine learning then goes on to add to the training set: every photo it identifies is added to the training set. This makes the program more effective and better in its task; it is learning.
You can find more English articles in our blog.
Other articles you might enjoy: