What is machine learning?

Introduction

If we want to put it in simple words, machine learning is about how to learn from observations. While in machine learning we also have learning models and learning algorithms, these models and algorithms have parameters that are adjusted based on the observations (i.e., data) and hence, the performance is increased due to the observations. Therefore, we typically say that a machine is learning if its performance, on average, improves by new observations.

Let's take a look at an example. We want to build a system that predicts the next outcome of a coin flipping experiment: we flip a coin and we want to say if the expected outcome is a tail or a head. It should be obvious that with a fair coin, tail and head will be observed with 50% of chances. But what about a balanced coin? So, we start looking at a few outcomes. Here is a sample:

Tail, Head, Tail, Head, Head, Head, Head, Head, Tail, Head

We had 3 tails and 7 heads in the first 10 coin flips! What can we say about this coin? What do you expect to see as the outcome of the next coin flip? I don't know about you, but I prefer to say Head!

So, here is the conclusion: with no observation, we have no idea about the coin! The best that we can do is to just say Head and Tail, randomly. Now that we have observations, we know that the coin is not fair and hence, we say Head and we know that our answer is correct most of the times. This means that with observation, our performance  is increased! Or in other words, we are learning (from the observations).

The big picture of a machine learning system is illustrated in the following figure.

ML-BasicModel.PNG

Machine Learning Tasks and Examples

There are various tasks in machine learning and there are a wide range of examples for each of these tasks that could be mentioned. In this section, the goal is to quickly review some of the most popular tasks in machine learning and talk about some examples.

 

Classification

Classification is one of the most popular tasks in machine learning. In classification, the goal is to classify the input data (the new observation that probably we did not see it before) into a few distinguishable classes. As an example, observing a fruit and classifying it as an apple, an orange, or a watermelon is a classification task. Another example of a classification task is to observe the GPA of the students and classifying them into strong and weak students.

In classification, to train the system, we expose it to the observations which is a collection of input data together with their corresponding labels. Here is an example for fruit classification:

FruitClasses.PNG

In this figure, we have 12 pictures of three different fruits (i.e., apple, orange, and watermelon) with their label. This set of pictures can be used to train an appropriate machine learning model which subsequently can be used for classification of new pictures of these three fruits.

 

Regression

Regression is very similar to classification: we have  a training dataset that includes input data and the corresponding target values. However, the target value in regression is a numerical variable. 

As an example, when we want to predict the stock market prices, the target value is a number (i.e., the price). Predicting the influenza cases in particular geographical location is another example of regression. In regression, during the training phase, input data is provided to the algorithm together with the target numerical value. When training is completed, the system should be able to generate an acceptable numerical output, as an estimation of the actual value, for any given input data.

 

Clustering

In clustering the goal is to find similar data points and put them in same groups. These groups are called clusters. In clustering, data points do not have any pre-determined label. 

One of the main applications of clustering is to extract patterns out of the data. As an example, by clustering some data points, we may observe that specific names are more popular in some specific states or cities, specific traffic citations are issued more frequently in certain parts of a metropolitan area, or a certain behavior is more likely to be observe among specific group of customers.

Example Applications

In this section, let us introduce some popular applications of machine learning.

Spam Filtering

Detection of spam emails is a critical task in email applications. By looking at the sender's email address, email subject, and email text, we can almost accurately detect spam emails and put them in a separate folder. As an example, we may observe that certain words are used more frequently in spam emails compared to regular emails. Hence, a classification algorithm may be trained for this purpose, that by looking at the frequency of a set of words, classifies the emails as spam/non-spam ones.

Face Detection

Face detection is a  classification task that is widely used in digital cameras. The goal is to detect if a face is in the picture and focus on that. Specific features, such as brightness and shape of the face may be used for this purpose.

ILI Case Count Forecasting

Influenza Like Illnesses is a term that is used to refer to all the illnesses with symptoms similar to influenza. CDC and similar organizations around the world are interested to forecast ILI counts per week to be prepared for any possible outbreak. Regression algorithms are widely used for this purpose.

Anomaly Detection

Anomaly detection is important in many domains. As an example, city planners are interested to detect anomalies in traffic patterns, retailers are interested to detect anomalies in their customers, and banks are interested to detect anomalies in transactions. As an example, anomalous bank account transactions are considered as fraud and hence, anomaly detection is a critical application for financial institutes. Clustering, regression, and classification algorithms are used for anomaly detection.