Machine learning Introduction!!

MLMath.io
4 min readFeb 10, 2019

Before we understand about machine learning, let’s discuss why do we need this and why everyone is talking about it.

Right from when first computer was invented, we are continuously trying to mimic the capability of human brain by writing various computer program and logic. In the past few decades we have discovered new algorithm and fine tuned the existing one to solve various problem.

Consider the complete set up, how would you write a program to flag a mail spam or ham:

  • you will notice the the keywords of spam mail like “offer”, “credit”, “loan”, etc.
  • You will write rules considering all the pattern that you have noticed above. Now you are able to flag a mail spam or ham.

Bur suppose the advertisers come to know how to bypass your spam filters , he will just replace the word “offer” with “offers”. In that case your spam filter will failed to detect spam mail. Also, long list of rules makes it harder to maintain the spam filters.

So most of the problems are not solvable by logical programming . Instead of building mathematical model by writing large number of logic and rules , build data driven model to find out the complex pattern across the data as it is very difficult to write and maintain large set of logic and rules. So wee need machine learning approach which could learn to generalize with given set of data.

Logical programming give instructions as input to the computer telling what to do, but machine learning give sets of instructions to the computer, it is making computer to learn from given set of instructions.

What is machine learning

Machine learning is study of algorithms that helps computers to learn without explicitly programmed.

Also, Machine learning is a mathematical model built over data which try to find out some meaningful pattern across it.

Machine learning algorithm help computers to learn from data. It models the pattern of your data(training data) that gives it decisive power to perform various tasks, such as image classification, spam filtering, sentiment analysis. The example data that are needed to build spam filters are known as training set.

Types of ML

It is basically categorized into three types on the basis of whether or not they need training supervision:

  • Super vised learning
  • Unsupervised learning
  • Reinforcement learning

There are two types of variable one is independent and another is dependent variable. Let’s assume you are doing image classification task, you have an image and its label(dog/cat). So given image is independent variable and its label is dependent variable.

Supervised learning

It is one of widely popular machine learning algorithms.In supervised learning algorithm both independent and dependent variable are given and they are also know as input and output variable. It learns an algorithm to map from input variable x to output variable y with the help of some mapping function f().

y = f(X)

The main objective of supervised learning to learn the mapping function f() so well that when a new unseen data x comes, it can able to predict output variable y.

Supervised learning problem is formulated into two ways:

  • Regression — when the dependent variable y is real number value, like student GPA, stock value etc.
  • Classification — when the dependent variable is a discrete value or categorical value like, digit classification (0–9) have 10 classes.

Some popular supervised learning algorithms are Linear regression, Logistic regression, SVM, Decision tree etc.

Unsupervised learning

In unsupervised learning algorithm only independent variable x are given. The goal of Unsupervised learning algorithm is to find an underlying pattern and distribution inside the data on the basis of similarity and differences.

It is called unsupervised because algorithm has to learn its own to find out structure in the data.

Unsupervised learning algorithm are further divided into two categories:

  • Clustering
  • Dimensionality Reduction

Some popular unsupervised learning algorithm are K-means, DBSCAN, PCA, LDA etc.

Reinforcement learning

Reinforcement learning is a sequential decision making algorithm. It has an agent and an environment. Where agent learn to act in a certain situation by continuosly interacting with the environment. The main goal of agent is to maximize the reward in a particular situation.

Work-Flow of RL

It is different from supervised learning in terms of data representation and how learning takes place , each example is independent in supervised learning having labels associated with it but in reinforcement learning, it has no existing example as it learns by interacting with environment and future decision is based on past decision , so there is no chance of data independent, and here instead of labels, reward are there .

It is different from unsupervised learning in terms of goal as unsupervised learning algorithm finds distribution and pattern in data but reinforcement learning finds optimal behaviour or action to act in a particular situation to maximize the reward.

Popular example of reinforcement learning is alpha_go, etc.

--

--

MLMath.io

Machine learning | Deep Learning | Reinforcement Learning | Probability