A Friendly Introduction to Machine Learning

Balaji Muthukrishnan
3 min readDec 7, 2017

As the name suggests, it is learning done by machines and not hardcoded by humans.

A traditional programming approach is that a programmer finds out all the possible paths an application needs and codes it. Whereas in machine learning approach the machine learns to solve the problem presented to it.

courtesy:image.slidesharecdn.com/

The above picture explains the difference between traditional programming and machine learning. The above difference may lead to a question, how can a computer possibly write a program? The answer to this question lies in the basics of computer science. When a program is written in any high-level language the program gets converted to 0’s and 1’s in order to be executed by the underlying hardware. So, it basically means the programs are converted to a numerical form to be executed by the machine. Since programs are numbers, it can be easily learnt by the machines by using mathematical optimizations.

Let’s try to understand the concept of learning with a simple example.

What is the possible value of Y when the value of X is 6, it's 216. How has the value of 216 arrived? it is based on functional approximation (i.e) the mapping between the values of X and Y is found as a pattern in the given sequence. In this example, the pattern is Y = cube(X), the approximation that maps X and Y which generalizes the relationship between those two variables.

In order to find the above relation, the learning algorithm should start guessing/predicting the value of Y, the predicted value is termed as Yhat. Initial prediction of Yhat is done randomly for every X. The actual value Y and predicted value Yhat are compared and the difference is calculated. The calculated difference is called error.

error = Y — Yhat

In order to reduce the error, actual value Y and predicted value Yhat should be equal for every X. In order to make the predicting value same as the actual value, an optimization algorithm is used to reduce the error to minimal value possible. This minimization of error is called as learning in Machine Learning algorithms. Once the learning is completed, the learning algorithm is capable of predicting Y for an unknown X.

The method of predicting Yhat differs for different machine learning algorithms. For example, Yhat prediction for Simple Linear regression is done using the following equation

Since the learning algorithm knows the X(input) and Y(output) values in advance, it is able to map the relationship between X and Y. These kinds of algorithms are called as Supervised algorithms.

--

--

Balaji Muthukrishnan

Data Scientist - Problem Solver, Statistics and Machine Learning practitioner.