Outlook of Machine Learning

“ A breakthrough in machine learning would be worth ten Microsofts. ” — Bill Gates

Darsh Jasani
8 min readApr 19, 2021

First thing that strike in mind when we hear the word “Machine Learning” is a robot : a dependable butler or a deadly Terminator. But let me tell you that Machine Learning is no longer a futuristic fantasy, it’s already in action. First Machine Learning program was a spam filter backs in 1990s which had actually learned so well that we don’t have to decide whether an email is spam or not anymore. It was followed by hundreds of ML applications which we use regularly from better recommendations to voice search.

So where does Machine Learning really starts and where does it ends? What exactly it means for a machine to learn something? Will it get suddenly smarter when I download a copy of book, has my computer really learned something? In this blog we will start by clarifying what is Machine Learning and why we want to use it. Then we will be all set to explore the Machine Learning continent. Let’s begin:)

What is Machine Learning ?

Machine Learning is the science ( and art ) of programming computers so they can learn from data provided.

More general definition would be :

“ It is field of study that gives computers the ability to learn without being explicitly programmed. ” — Arthur Samuel, 1959

More engineering view definition would be :

“ A computer program is said to learn from experience E with respect to some task T and some performance measure P, if it’s performance on task T as measured with P is improved with experience E. ” — Tom Mitchell, 1997

For example, your spam filter is a Machine Learning program that can learn to mark an email as spam from examples of spam emails (marked by users) and examples of non-spam email (ham email). So here examples which program uses to learn are know as training set. Each training example is a sample in training set. Here task T is used to mark new emails as spam, experience E is training set and performance measure P needed to be defined (ratio of correctly classified emails). So performance measure P is often called accuracy of your program.

Why use Machine Learning?

Consider how you would write a spam filter using traditional programming approach :

  1. First you would look at spam email and you might notice that words like “free”, “discount”, “amazing ” and “4U”. Perhaps you would notice other patterns like email’s body, sender’s email and so on.
  2. Now you would an algorithm that detect this patterns and marks an email as spam or not.
  3. You would test your program and repeat step 1 and 2 until it is good enough.

Since the problem is not trivial, your program will end up with long list of complex rules which are hard to maintain. Moreover, if spammer notice that email with “4U” are blocked then they might start writing “For U” instead. Here we need to update your program to detect “For U” also. If spammer keep working around your spam filter, we will need to update your program with new rules forever.

In contrast, Machine Learning approach will automatically detect that “For U” has become unusually frequent in spam emails marked by users and now it will automatically mark email as spam without your intervention. Another area where Machine Learning shines is for problems that either are too complex for traditional approaches or have no known algorithm. For example, speech recognition or self driving car.

Machine Learning can help human learn.

Finally, Machine Learning can help humans learn ML algorithms can be inspected to see what they have learned. Applying ML techniques to dig into large amounts of data can help discover patterns that were not immediately apparent. This is called data mining.

Types of Machine Learning Systems

Following are different type of ML Systems classify broad based on categories:

→ Whether or not they are trained under human supervision { supervised, unsupervised, semisupervised and reinforcement learning }

→Whether or not they can learn incrementally to fly {online vs batch learning }

→Whether they work by simply comparing new data examples with known data examples { instance-based vs model-based learning}

These classification is not exclusive, you can combine them in any way you like. Let’s look at each of them one by one.

Types of Machine Learning Systems

Supervised Learning :-

→ In supervised learning, training set that we feed to algorithm includes the desired solution know as labels. Moreover supervised learning are typically of two type- classification & regression.

Spam filter is good example of classification because we trained many example email along with their class (spam or non-spam) emails and program will learn how to classify new emails. Whenever we want to predict something like price of house or price of a car, they are example of regression. In this. we need to train the systems with both features (mileage, age, brand etc )of a car and their labels (prices ).

NOTE that some regression algorithm can be used as classification as well and vice versa. For example Logistic Regression is commonly used for classification also.

Unsupervised Learning :-

→ In unsupervised learning, training set is unlabelled or without desired solution. The systems tries to learn without a teacher.

→ For example, you have lots of data of covid-19 patients. Now you run a clustering algorithm which will try to detect groups of patients with similar symptoms. At no point of time you tell algorithm which group of patients belongs to, system will find itself.

Unsupervised Learning

Semisupervised Learning :-

→ Some algorithm can deal with partially labelled training set, usually a lots of unlabelled data and little labelled data. This is know as semisupervised learning.

→ Google Photos is a good example of this, where it automatically recognise same person and if we label that person in one of the picture, system will automatically label others photos in which he/she is there.

Reinforcement Learning :-

→ Reinforcement learning is all different. In this system learns by observing environment, select and performs action and get rewards or penalties in form of negative rewards. System must learn by itself what is best strategy know as policy. A policy defines what action to take when it is in a given situation.

→ DeepMind’s Alpha Go is good example of Reinforcement learning. Note that learning was turned off during the game, Alpha Go was just applying policy it had learned.

Reinforcement Learning

Batch Learning :-

→ In batch learning, first system is trained then it is used in live action and runs without learning anymore, it applies what it has learned. This is also know as offline learning. If we want to train system on new data then we have to train new version of system from scratch and then train on old as well as new training data.

→ It may take many hours to train new system, so typically we train new system every 24 hour or weekly. Also, training on full sets of data requires lots of computational power (memory space, CPU, disk I/O, network I/O, disk space).If amount of data is huge, it may be impossible to use batch learning algorithm.

Online Learning :-

→ In online learning, we train the system incrementally by feeding new sample data sequentially, either individually or by small groups (mini-batch). Each learning step is fast and computational cheap, so system will learn about new data simultaneously, as it arrives. Here we can train a system that predicts stock prices, which may change simultaneously as new data arrives.

→ Online learning algorithm can also be used to train system on huge datasets which cannot fit into one machine’s main memory. This is called as out-of-core learning. The algorithm loads part of data, train on it and repeat the process until it runs on all of the data.

Online Learning

Instance-based Learning :-

→ Possibly the most trivial way of learning would be to learn by heart. If we want to create a spam filter, simply mark emails as spam which are similar to spam emails marked by user itself.

→ In Instance-based learning, system learns examples by heart and then genearlizes to new cases by comparing to the learned examples, using a similarity measure.

Model-based Learning :-

→ Another way to generalise from a set of examples is to build a model of these examples and then use this model to make prediction. This is know as model-based learning.

→For example, if we had built a system that differentiates between triangle and square and if new instance arrives then model will predict whether it is triangle or square.

Model-based Learning

Summary

In this blog, we have learning a lot of different stuff about machine learning. I hope it have answered your many questions on machine learning, What it is ML, Why use ML, different type of ML etc. Moreover, we have also learned brief about different type of machine learning system. Hands-on Machine Learning by Aurélien Géron has help me a lot to write this blog. Hopefully, all the basic concept of machine learning continent has being covered.

That’s all from my side guys. Thank you from reading this blog :) If you want to add more, do let me know through my LinkedIn link. Do share within your friends circle because network is more important then net-worth. Do not forget to 👏, it will really motivate to me. Stay Safe and Stay Happy✨

Below are few links if you want to connect with me🤠

Also have a look on my previous blogs.

--

--