What is machine learning ?

Ampatishan Sivalingam
The Startup
Published in
5 min readNov 24, 2019

--

Machine learning is an art where the machines are programmed to learn from data themselves. In a more descriptive way:

“A program is said to learn from experience E with respect to some task T and some performance measure , if its performance on T, as measured by P improves with experience E”. — Tom Michell

The spam email filtering system, that we use over a decade now, is also a machine learning model, which has been taught to identify spam mails from ham. Here the example used by the model to train (i.e set of spam and ham mails) is known as the training set, single element from the training set is known as training sample. If we try to apply Tom’s definition to this problem, the task T is to detect spam mails from ham mail, the experience E is the training data and a performance measure P should be defined.

Suitable solution to this problem

In order to identify the spam emails, the system has to find out the pattern followed by the spammers in writing the emails, for example a particular set of words will be used by the spammers, ex : congratulations, winner, cash prize etc. So if the system was given the set of words then it can identify spam mails, but in case if the spammer find out this and change his pattern of writing emails, then we have to again find the particular set of words in the new pattern and rewrite the system. The same cycle continues, if we deploy a machine learning model to solve this problem the entire emails will be given as training set and the model will detect spams by identifying patterns used by the spammer, even if he change his pattern of writing emails, the model will learn the new set of words by itself.

Machine learning models

Machine learning models, that are available now can be categorized based on many principles, prominent principles out of those are : level of human intervention during training phase, whether they can learn all at once or not and how they predict new outputs.

Considering the level of human intervention during training phase, we can divide them into supervised learning, unsupervised learning, semi-supervised learning and reinforcement learning.

Classification task (spam email filter)

For a supervised learning model, we have to provide the data (i.e the emails both spam and ham) and also the labels for each training sample (whether each one of them is spam or ham). Then the model will identify the similarities within the spam emails and when a new email is given, it will analyze the email to find out whether the email shares the same similarities as of the spam emails. There are mainly two types of problems solved using supervised learning models: classification and regression. classification is the process of categorizing giving data into a predefined class, for example categorizing a new email into spam or ham, while regression deals with prediction of numerical value. For example if the area of houses and their corresponding prices is used to train a regression model, it will predict the price of a new house given the area of the new house.

Regression task

When an unsupervised model is considered we only provide the data (without any labels) and the system will try to learn pattern among the data by itself. Unsupervised learning problems can be classified into four main categories: Clustering, Visualization and dimensionality reduction, association rule learning and anomaly detection (these will be covered in detail latter).

Unsupervised learning (Clustering)

As the name suggest a semi-supervised learning consists of both supervised learning as well as an unsupervised learning meaning the training data will contain both the labeled data set as well as the unlabeled data. For example internet content classification, where the webpages will be clustered based on their content (that is the task for an unsupervised model), then each cluster will be labeled based on their content (that is the task for supervised model).

Reinforcement learning is a completely different topic, there is an agent will interact with environment by performing actions and receive rewards or penalties in return. The agent will learn the best strategy that will increase the rewards it earns, that strategy is known as policy of the agent.

The other classification is online learning and offline learning. Offline learning or batch learning means, the model will be first trained on the whole set of data and then it will be deployed to use. After deployment the model will not be trained using new data. In case if the model needed to be trained using new data, then a new model will be developed from scratch and will be trained using old data and new data, then will be deployed. This is okay for most applications but some applications need rapidly adapting models, since training of a model from scratch takes a lot of computational resource and time, these models can’t be used for applications like stock exchange prediction.

In those situation online learning come into play, an online learning model will be trained gradually using data. The training process of this model lasts for its lifetime, so even if the new data pattern changes from the previous data patterns, it can recognize the new patterns and predict accordingly. Another use case for online learning model is, when the training data is too big for the hardware to handle, then the training data will be split into many small parts and will be trained repeatedly. This helps systems with less hardware specifications to be used for training and deployment purposes.

In the future post I will cover the third category, categorizing based on how models predict.

--

--

Ampatishan Sivalingam
The Startup

Data Scientist | Machine learning enthusiast | Electronic and telecommunication engineer