Machine Learning — Explained

Harinath Selvaraj
coding&stuff
Published in
5 min readSep 27, 2018

Hello People! We’ll start off by understanding what exactly is machine learning and then we’ll head on to look at some applications of machine learning following which we will take a look at the different languages to implement machine learning algorithms and understand what makes R so popular for the going ahead.

Read out my other articles where we’ll understand the different types of machine learning algorithms and finally we’ll be working on a very interesting case study to implement all that we’ve learned.

Lets get started ! Let’s understand the concept of machine learning with an example -

What do you see in the below image? what is this exactly?? It’s a fish isn’t it ?

How about this again? A fish

This well this is also a fish!

Now how do you know all of these are fish? As a kid you might have come across a picture of a fish and you would have been told by your kindergarten teacher or your parents that this is a fish and your brain learned that anything which looks like that is a fish and that is how our brain functions.

But how about a machine? If the same image is fed to a machine, how will the machine identify it to be a fish?

This is where machine learning comes in. We will keep on feeding images of a fish to a computer with the labeled fish until the machine learns all of the features associated with the fish. Once the machine learns all of the features associated with the fish, we will feed it new data to determine how much it has learnt.

In other words raw data or the training data is given to the machine so that it learns all the features associated with the training data. Once the learning is done, the machine is given new data or the test data to determine how well it has learned and that is the underlying concept of machine learning.

Now that we’ve understood what exactly is machine learning let’s go ahead and look at some applications of machine learning.

The aviation industry uses machine learning for tasks such as finding optimal air routes, predicting flight delay and dynamic pricing. All of these are quite serious optimization problems which can be solved by machine learning. Marketing organizations are in love with machine learning. According to Twitter, 75% of marketing enterprises use machine learning to enhance customer satisfaction and also to improve sales of new products and services. Healthcare industry uses machine learning for drug discovery and disease prediction. Robotic surgery is also an application of machine learning. The Da Vinci robot is a device which helps doctors to perform surgeries with fine detail.

Machine learning has wide applications in financial industry as well such as building econometric models and finding out fraudulent transactions.

Google’s much-hyped self-driving car and the automated drones used in military are also applications of machine learning.

Machine Learning Languages

Now let’s move ahead and look at the different languages which can be used to implement machine learning algorithms.

R and Python are the most widely used languages to implement machine learning and that is because they provide wide variety of packages for the purpose of data science, Machine learning and visualization.

MATLAB is another language which is used for image recognition and machine learning.

Java also provides machine learning libraries such as mallet and deep learning 4G.

Why R for machine learning?

R is a Turing complete language i.e.) It can perform any computation which a turing machine can and thus we can perform tasks such as statistical analysis, predictive modelling and also implement machine learning algorithms. R also provides both object-oriented and functional programming paradigms. The best thing about R is a free open source software and hence there are no licensing restrictions at all.

Basic Steps in Machine Learning

It’s time to look at the steps involved in building a machine learning algorithm. We’ll start off by ingesting the data from various sources and once the ingestion is done, the data needs to be cleaned so that simple insights can be found from it.

After cleaning and understanding the structure of the data, we’ll divide the entire data set into train and test sets and we’ll apply algorithm on top of the train set.

Once the algorithm learns, all the features of the train set will check for the models accuracy with the test set and finally with a value the result by using various parameters such as confusion matrix and root mean square error.

We’ll be implementing both the confusion matrix and root mean square error in a case later on.

We’ll have a look at the different types of machine learning algorithms.

Supervised machine learning

Unsupervised machine learning

Reinforcement machine learning

Supervised Learning

Let’s start with the first one — Supervised Learning. A supervised learning algorithm learns from a known data set with labels i.e.) it needs a training data set to learn all the features and once it learns these features it is given the test set to check for its accuracy.

Let’s take this example — there is a student who is about to appear for a test. Before appearing for the test, he needs to train himself well so that he can perform well in the test. This is the concept behind supervised learning.

Some examples of supervised learning are Classification and Regression

you can further read about Classification and Regression along with examples in the below blogs —

Unsupervised Learning

Thanks for reading ! 😃

--

--