Skip to content

Introduction to Machine Learning

Hi everyone! I hope you are doing great. Have you ever wondered how Google knows what you are looking for or classifies email as spam or not spam? Machine learning algorithms and artificial intelligence work behind the scenes to make this happen.

We all are generating lots of data. Technology companies use this data to provide us with services that we all enjoy. This article covers what is machine learning, its application examples, and how ML is different from traditional programming.

 We suggest you read this article on how to convert a business problem into an ML problem.

What is Machine Learning?

Different authors defined machine learning in different ways. But all led to the same conclusion. Please read the following machine learning definitions from different authors.

It can learn and improve from past data and experience without being explicitly programmed.
It is the field of study that gives machines the ability to learn without being explicitly programmed.
Machine learning is about using mathematical functions to automate the rule-generation process.
Machine Learning is the field of study that gives computers the ability to learn without being explicitly programmed.
Arthur Samuel, 1959
A computer program is said to learn from experience with respect to tasks and some performance measures P. If its performance on 7. as measured by P, improves with experience E.
Tom Mitchell, 1997

Application Examples of Machine Learning

Here is the list of examples of products that uses machine learning algorithms.

This image shows the application examples of machine learning algorithms.

Recommendation System

Shopping websites recommend products that we wish to buy. How do these websites know what you want to purchase?

Take a pause and brainstorm on this…

These websites track your online activity and create your database. From this data, they can predict the probability of you buying a product. Based on this probability they recommend a new product.

For example, when I search Google for the best smartphone under 15k. The system will add this activity to my database. The system will start showing me ads for a smartphone under 15K. This is because the system knows I need a smartphone, and my budget is 15K based on my activity.

Email classification (e-mail is spam or not spam):

A spam filter is an ML program that can learn to flag spam. To achieve this the system needs examples of spam and regular (non-spam, also called “ham”) emails.

  • This collection of examples is called the training set.
  • Each training example is called a training instance (or sample).

In this case, task T is to flag spam for new emails, experience E is the training data, and performance measure P needs to be defined.

Self Driving Cars

Self-driving cars run on roads and make decisions similar to human drivers such as:

  • When to speed up or slow down.
  • Apply brakes.
  • Turn the steering.
  • Change lanes, etc.

Self-driving cars make these decisions according to the sensor data.

Interactive App Development

  • Add filters to images in mobile apps such as Instagram.
  • Try on sunglasses on lenskart app.
  • Check out new furniture in your space using the IKEA app.

All of these mobile apps use ML and deep learning algorithms to provide these services.

Now the question is

  • Google has written a separate program for every user to show advertisements.
  • Or there is a team of humans sitting behind to make a decision on which advertisement to show.

Both statements are not true. In reality, there is a very complex ML algorithm working behind the scenes. These algorithms give us recommendations based on the user’s previous history. This one machine learning model works best for the maximum number of users and in most scenarios.

Machine Learning vs Traditional Programming

Workflow for conventional Algorithms or Traditional Programming

Workflow for traditional programming Algorithms

As shown above, in traditional programming, the programmer needs to formulate the rules manually. We input data and the program give output according to rules.

Workflow for Machine Learning Algorithms

This image shows the workflow for machine learning algorithms.
Workflow for Machine Learning Algorithms

Machine learning is entirely different from traditional programming. The ML algorithm automatically formulates the rules. In ML, we provide data (input along with output labels) to a selected machine learning algorithm, and in output, we get a machine learning model.

We input the unknown data into an ML model and get a predicted output.

Where to apply machine learning instead of traditional Programming?

Machine learning is recommended over traditional programming in the following conditions:

  1. Traditional approaches require a lot of hand-tuning or long lists of rules. Whereas one Machine Learning algorithm can often simplify code and perform better.
  2. Complex problems where the conventional approach of creating roles does not work such as spam filtering, and voice recognition.
  3. Getting insights about complex problems and large amounts of data.

Types of Machine Learning Algorithms

We can classify ML algorithms into the following types according to the type of data.

  1. Supervised Learning
  2. Unsupervised Learning
  3. Semi-Supervised Learning
  4. Reinforcement Learning

Supervised Machine Learning

In supervised learning, we input labeled input data to the ML model for training. Most of the machine learning algorithms we use in our day-to-day life are supervised machine learning algorithms.

This image shows Unsupervised Machine Learning Representation

Examples of Supervised ML

  1. The spam filter is trained with many example emails along with their class (spam or ham).
  2. Predict the price of a house or car from given a set of features (mileage, age, brand)

Unsupervised Learning

In unsupervised learning, we input unlabeled input data to the machine learning model for training. In other words, we input the feature values only, not the results.

This image shows Unsupervised Machine Learning Representation

Example of Unsupervised Learning

  1. User Segmentation using clustering
  2. Data Visualization
  3. Dimension Reduction
  4. Anomaly detection: Determine a defect in a machine before it occurs, fraud detection.

Semi-supervised Learning

In semi-supervised learning, we combine labeled and unlabeled input data to machine learning models for training. For example, Google Photos are one of the best examples of semi-supervised machine learning.

Reinforcement Learning: Environment, Agent: Learn with time

Reinforcement Learning is completely different from supervised or unsupervised learning. In this learning system, we have an environment and an agent. The agent can observe the environment, select and perform actions, and get rewards/penalties in return.

This image shows Reinforcement Learning representation

It must learn the best strategy (policy) to get the most reward. A policy defines what action the agent should choose when it is in a given situation.

FAQ on Machine Learning Basics

Conclusion

Machine learning is changing the way we do business. It has applications in all industries from medical, manufacturing, hospitality, and entertainment. In this article, we tried to understand the basics of machine learning.

We suggest you read this article on the steps in Machine learning Lifecycle.

Thanks for Reading! Enjoy Learning

Leave a Reply

Your email address will not be published. Required fields are marked *