Tuesday 29 September 2015

Machine learning: Lets dig into it!!

Machine learning is the fascinating term for most of us. I am sure that even you are among one of those curious beings on this planet, who wants answer to few of the following questions: 

1) Why is topic on machine learning here? 
2) What exactly is Machine Learning all about?
3) How do you use it in real world problems?
4) Which all problems can be solved using Machine Learning?
5) I am aware that it requires lots of data. What exactly does this data mean? How much data is necessary?
6) How accurate will machine learning algorithm prove?
7) Is it worth all the recognition it has received in the recent years?
Give your curious wings some rest and lets walk slowly through all the content calmly. I will try to cover basics of machine learning in separate topics. I will also get into details of few algorithms that are widely used today. So lets get started ! 

What is Machine Learning?

Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning focuses on the development of computer programs that can teach themselves to grow and change when exposed to new data. It evolved from the study of pattern recognition and computational learning theory in artificial intelligence. Machine learning explores the study and construction of algorithms that can learn from the data sets provided and make predictions on new data. Such algorithms operate by building a model from example inputs in order to make data-driven predictions or decisions, rather than following strictly static program instructions.  
1) Machine learning can help you predict what will the temperature in city X studying the pattern of temperature for last few days in that city.
2) Machine learning can help the us detect whether a tumour is malignant or not.
3) Machine learning can help us predict whether a particular product will be bought by customer depending upon the previous purchase patterns.

Machine Learning problems can be classified into following categories:
1) Supervised Machine Learning
2) Unsupervised Machine Learning
3) Semi-supervised Machine Learning
4) Reinforcement Machine Learning
5) Deep Learning

Today, a lot of computer vision techniques have been integrated with machine learning, improving the results observed. I myself have been using machine learning with computer vision algorithms. Here, we will be dwelling deeper into supervised and unsupervised form of learning as and when the necessary concepts need to be explained. 

1) Supervised Machine Learning:

In a supervised learning algorithm, the data is a set of training examples with the associated “correct answers”. Supervised learning is a type of machine learning algorithm that uses a known dataset (called the training dataset) to make predictions. The training dataset includes input data and response values. From it, the supervised learning algorithm seeks to build a model that can make predictions of the response values for a new dataset. A test dataset is often used to validate the model. Using larger training datasets often yield models with higher predictive power that can generalize well for new datasets. An example of this would be learning to predict whether an email is spam if given a million emails, each of which is labeled as “spam” or “not spam”. 

Examples of Supervised Machine Learning:
1) Decision tree 
2) Ensembles (Bagging, Boasting, Random Forest)
3) Linear Regression 
4) Artificial Neural Networks
5) Logistic Regression 
6) Support Vector Machine

Now, supervised machine learning can be used to perform two types of tasks:

  • classification.
  • regression.
Output of task performed with regression model will be a continuous value while output will be a discrete label for task performed using classification model. e.g.: the temperature prediction task for city X would be performed using regression model as the temperature value can take continuous value in a particular climate range. On other hand, predicting whether a given tumour is malignant or not is performed using classification model as it will have definite discrete values as output i.e. yes or no ( in our case). The task of optical character recognition is again a classification problem as the output of the model has to be one of the 26 characters for which it has been trained.

2) Unsupervised Machine Learning: 

In an unsupervised learning algorithm, the algorithm can find trends in the data it is given, without looking for some specific “correct answer”.  Unsupervised learning is a type of machine learning algorithm used to draw inferences from datasets consisting of input data without labeled responses. The most common unsupervised learning method is cluster analysis, which is used for exploratory data analysis to find hidden patterns or grouping in data. The clusters are modeled using a measure of similarity which is defined upon metrics such as Euclidean or probabilistic distance. Examples of unsupervised learning algorithms involve clustering (grouping similar data points) or anomaly detection (detecting unusual data points in a data set).

Common clustering algorithms include:

  • 1) Hierarchical clustering
  • 2) k-Means clustering
  • 3) Gaussian mixture models
  • 4) Self-organizing maps
  • 5) Hidden Markov models

3) Semi-Supervised Machine Learning:

As the name suggests, Semi-supervised machine learning falls between unsupervised i.e without any unlabeled data and supervised machine learning i.e completely labeled data. Semi-supervised learning is class of supervised learning tasks which also makes use of unlabeled data. Many researchers have found it to be advantageous to use unlabeled data in conjunction with a small amount of labeled data. The semi-supervised learning technique is used with the goal of reducing the amount of supervision required as compared with supervised learning while improving the unsupervised clustering to meet the expectations of user. 

4) Reinforcement Learning:

Reinforcement learning is an area of machine learning inspired by behaviorist psychology, concerned with how software agents ought to take actions in an environment so as to maximize some notion of cumulative reward. The problem, due to its generality, is studied in many other disciplines such as game theory, control theory, operations research, information theory, simulation based optimization, multi-agent systems, swarm intelligence, statistics and generic algorithms. In the operations research and coontrol literature, the field where reinforcement learning methods are studied is called approximate dynamic programming.

5) Deep learning:

Deep learning(deep machine learning, or deep structured learning, or hierarchical learning, or sometimes DL) is a branch of machine learning based on a set of  algorithms that attempt to model high-level abstractions in data by using model architectures, with complex structures or otherwise, composed of multiple non-linear transformations. Deep learning is part of a broader family of machine learning methods based on learning representations of data. An observation (e.g., an image) can be represented in many ways such as a vector of intensity values per pixel, or in a more abstract way as a set of edges, regions of particular shape, etc. Some representations make it easier to learn tasks (e.g., face recognition or facial expression recognition) from examples. One of the promises of deep learning is replacing handcrafted features with efficient algorithms for unsupervised or semi-supervised feature learning and hierarchical feature extraction.

We will start getting into details of many of the supervised and unsupervised machine learning algorithms as  mentioned above. I would also highly recommend everyone to take up the machine learning course by Andrew Ng at Coursera. It is one of finest online video lecture course on Machine learning!

1 comment: