Machine Learning With Spark

3 / 7

Types Of Machine Learning

Machine learning is largely classified as supervised, unsupervised and reinforcement. In supervised machine learning, we are provided input and expected out. The program learns to predict the output of unseen inputs or learns to map input to outputs.

When we don't have a mapping of input to expected output, we call it unsupervised machine learning. In unsupervised machine learning we are not provided with the labels of data, instead, we are supposed to find the structure in the data.

Reinforcement learning is an area of machine learning concerned with how software agents ought to take actions in an environment so as to maximize the reward. In reinforcement learning, the program is provided with a dynamic environment and it should achieve a certain goal by interacting with the environment.

The Reinforcement learning differs from standard supervised learning in that correct input/output pairs are never presented, nor sub-optimal actions explicitly corrected. Instead, the focus is on on-line performance, which involves finding a balance between exploration (of uncharted territory) and exploitation (of current knowledge)

The supervised learning is further categorized as classification and regression. And the example of unsupervised learnings is clustering.

In classification supervised machine learning, the objective is to identify which of a set of categories (sub-populations) a new observation belongs, on the basis of a training set of data containing observations (or instances) whose category membership is known.

For example, identifying an email as spam and not an spam. The first machine is provided with emails which are labeled as spam and not spam. Afterward, the machine should classify if an email is a spam or not-spam.

The other example is optical character recognition. Here given an image, the computer should identify which number is present in the image out of 0 to 9. For training, the computer is provided with a lot of images labeled with a corresponding digit.

In case of regression, the objective is to predict a value which is continuous instead of discrete or categorical as in classification.

Let's take an example of regression. Say we are given historical data in the form of X and Y. X could be years of experience and y could salary. The objective would be to predict the salary based on the experience.

After plotting it, if the data looks like it will fit a straight line, we use linear regression. In linear regression, we basically draw all possible lines calculating the distance from all the points. The line having the least distance is considered as the model and is used for predicting future.

Clustering is an unsupervised machine learning task.

In clustering, we essentially group similar items together. We need to define the criteria for similarity.

Sometimes, we may need to group elements to form a hierarchy (inverted tree). This is known as hierarchical clustering.