# What is Machine Learning?

What is Machine Learning? – How do we teach machines without having to explicitly program them?

We teach them with data – a process called machine learning. Machine learning is a subfield of artificial intelligence based on statistics. It involves a machine, learning how to solve a problem without being explicitly programmed to do so.

The machines are able to do this by detecting statistical patterns in data. Essentially, with machine learning we use existing data and a training algorithm to learn a model of the data. We can then feed new data into that model that it’s never seen before and make predictions about the new data.

A machine learning model is essentially a function. It is simply a mapping from an input to an
output. In this case, it takes data as an input and produces a prediction as an output.

For example, imagine we have a conveyor belt of fruit of different sizes. We need to separate the apples from the bananas as they go by. However, we only have sensor readings of each fruit’s length and height.

How would we build a model to predict which fruit is an apple and which fruit is a banana? First, we would need to create a table of data called a training set. This data set contains the lengths and heights of a bunch of randomly selected apples and bananas. When recording these data, a human would label each type of fruit in each row as either an apple or a banana based on visual inspection.

Next, we would feed these data into a machine-learning training algorithm. The algorithm would inspect each row of data containing the length, height, and the type of fruit. The algorithm would learn how length and height correlate with each type of fruit. Apples are more round and bananas are more elongated. The machine-learning training algorithm captures this statistical relationship as a mathematical model.

Finally, if we’ve done everything correctly, we can use this data to make predictions. We can feed this model a new apple or banana that it’s never seen before. And the model will tell us whether the new
fruit is an apple or a banana. More precisely, it will tell us the statistical likelihood that the new fruit is either an apple or a banana.

This is a vastly over-simplified explanation of machine learning. However, it captures the essence of what it is that we’re attempting to accomplish.