Introduction to Machine Learning

What is Machine Learning?

Machine Learning is the science of teaching computers to learn from data. In Arthur Samuel’s words:


Basically, the core idea in Machine Learning is that there are generic algorithms that can tell you something interesting about a set of data without you having to write any custom code specific to the problem. In a standard program, like when we want to teach the computer to sort data, we provide a very specific set of instructions and the computer just follows those instructions. But with Machine Learning, instead of writing explicit code, you feed data to a generic algorithm and the algorithm is able to build its own logic based on the data.

Your spam filter is an example of a Machine Learning program. There is no specific algorithm like one for sorting an array, but given examples of spam and non-spam emails, the computer can automatically learn to flag spam emails. This is achieved by detecting specific patterns, like occurrence of certain words and phrases in spam emails compared to non-spam examples (e.g., “FREE”). In this scenario, the performance of the algorithm can then be assessed by the ratio of correctly classified spam emails.

Another example: you can provide a computer a set of cat pictures, which say, “this is a cat” or “this is not a cat”. Then if shown a series of new photos, your Machine Learning application would begin to identify cat photos in the new set.

In Machine Learning terminology, the examples that the system uses to learn are called the training set, and each training example is called a training instance or sample.

Can you think of some examples of Machine Learning applications from your everyday life?

Here are some popular ones:

  • Virtual Personal Assistants: Siri, Cortana, Alexa, Google Now
  • Finance: Fraud detection, prediction and execution of trades at speeds and volumes that humans can’t compete with
  • Social Media: Face Recognition, People You May Know, Pages You Might Like
  • Retail: Product Recommendations; maximization of revenue by learning customers’ habits
  • Online customer support: Customer support representatives are being increasingly replaced by chatbots
  • Medicine: Medical diagnosis, drug discovery, understanding of risk factors for diseases in large popoulations
  • Search Results: When you search on Google, the backend keeps an eye on whether you clicked on the first result or went on to the second page – the data is used to learn from mistakes so that relevant information can be found quicker next time


machine-learning-bubble chart


Types of Machine Learning Algorithms

Machine Learning algorithms can be broadly categorized as follows:

1.Supervised Learning

In Supervised Learning, the training data you provide as input to the algorithm includes the final solutions, called labels or class the algorithm learns by “looking” at the data with correct answers. The spam filter is a good example of this the algorithm is trained with many example emails with their true class (spam or non-spam), and it learns how to classify new emails based on the patterns learnt from the given examples.

Another typical task would be to predict a target numeric value (such as housing prices) from a set of features (size, location, number of bedrooms, etc). To train the system, you need to provide many examples of housing prices, including both their features and their labels (i.e., their prices), and the training process is continued until the model can predict housing prices with a desired level of accuracy.

Examples of Supervised Learning Algorithms:

  • Linear Regression
  • Logistic Regression
  • Support Vector Machines
  • Decision Trees and Random Forests
  • k-Nearest Neighbors
  • Neural networks

2. Unsupervised Learning

In Unsupervised Learning the data has no labels, and the goal is to find relationships in the data — the system needs to learn without a teacher. For instance, say I have a lot of data about my blog’s visitors, I might want to find groupings of similar visitors. I do not know and I cannot tell the algorithm which group a visitor belongs to; it finds those connections without help and the insights can help me to target posts for each group.

Examples of Unsupervised Algorithms:

  • Clustering: k-Means
  • Visualization and dimensionality reduction: Principal Component Analysis (PCA), t-distributed Stochastic Neighbor Embedding (t-SNE)
  • Association rule learning: Apriori

3. Semisupervised Learning

Semisupervised learning deals with partially labeled training data, usually a lot of unlabeled data and some labeled data. Most semisupervised learning algorithms are a combination of unsupervised and supervised algorithms.

Google photos is a good example of this. In a set of family photos, the unsupervised part of the algorithm automatically recognizes the photos in which each of the family members appears. For example, it can tell that person A appears in picture 1 and 3 while person B appears in picture 1 and 2. After this step, all the system needs from you is one label for each person and then the supervised part of the algorithm can name everyone in every photo.

4. Reinforcement Learning

Reinforcement Learning is a bit special and more advanced category — the learning system or agent needs to learn to make specific decisions. The agent observes the environment to which it is exposed, it selects and performs actions, gets rewards in return (or penalties in the form of negative rewards), and it’s goal is to choose actions which maximize the reward over time. So by trial and error, and based on past experience, the system learns the best strategy, called policy, on its own.

A good example of Reinforcement Learning is DeepMind’s AlphaGo. The system learned the winning policy at the game of Go by analyzing millions of games and then playing against itself.  At the championship of Go in 2017, AlphaGo was able to beat the human world champion just by applying the policy it had learned earlier.

End Notes

This was a gentle introduction to Machine Learning. Hopefully, you are excited to learn more about this cool field and to continue in this journey ‘Towards Machine Learning’!

Now you can proceed to the next post to learn about the various Machine Learning algorithms.

                                                     .  .  .

Thanks for reading! If you enjoyed this post and you want to continue on this Machine Learning journey, follow to receive the latest right at your inbox.

5 thoughts on “Introduction to Machine Learning

Add yours

Leave a Reply


You are commenting using your account. Log Out /  Change )

Twitter picture


Facebook photo


Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: