Wednesday, December 13, 2017

Learning - Machine Learning

It all started with a nudge in the Intelligent Algorithms class in my college days. IIT Delhi. My Alma mater. One of my close friends used to be very excited about neural networks. The course he had taken, the languages he spoke, I could not fathom a word. Luckily, I took a course wherein I had to do load forecasting, and thus was introduced to the world of Machine Learning.

I had first learnt Neural Networks rather than traditional machine learning. Neural networks, a dense layer of interconnected 'neurons', is called so probably taking inspiration from the analogy such a matrix model exhibits to the concepts of neuroscience. Neural networks are foundations for deep learning, however, the field of Machine Learning is inspired from statistics and is completely different.

Machine Learning is the ability of a 'model' to predict a result within certain acceptable error margin. Generally, we solve two kinds of problem with ML techniques.

  1. Regression
  2. Classification
Regression is a more common problem for the prediction of data related to time series. For instance, predict electrical load in an area for tomorrow or predict sales at a cookie store this Christmas. For all other kind of predictions, Classification comes in handy. For example, predict whether it will rain today or not.

There are many basic and advanced techniques available for both Regression and Classification. However, to understand Machine Learning as a concept, I would suggest understanding Linear Regression, Logistic Regression and Support Vector Machine. Most of these concepts can also be implemented using curve fitting and mathematical optimization, however, such solutions tend to 'overfit' i.e. skew towards certain features.

Learning some advanced machine learning techniques should follow after these basic ones especially when one wants to solve real problems in ML. Some advanced techniques like Matrix Factorization, Multinomial Logistic Regression, etc are very commonly used. It can be argued that these algorithms are generally available on the internet, so why invest time learning what they do?

Today, every corporation, however small, generates tremendous amount of data. This raw data needs to be sanitized and formatted in the way these machine learning algorithms understand. Most importantly, one needs to analyze and create 'train', 'test' and 'validation' set. Generating an appropriately randomized well distributed data set is of utmost importance.

Training data set is the one used for training the model. Validation set is used for optimizing hyper parameters of the model, so that acceptable predictions are made using limited resources. Test set is the data on which the model needs to be tested for accuracy or error. Always follow this thumb rule of dividing the data in Set 1 and Set 2, with Set 2 being the smaller set. Call Set 2 as validation set. From Set 1 divide training and testing set. Mixing up set 2 with other sets would create a bias to the hyper-parameters - regularization and learning rates. This bias can harm the accuracy of and time taken by the model to converge to an acceptable error margin.

Actually, 'learning' Machine Learning through basic concepts gives you the confidence to train bigger models, especially ensemble of various ML models. It is also equally important to first understand your data and sanitize it according to algorithm that you might plan use. Just for the sake of enhancing emphasis on thorough understanding of basic concepts in machine learning, I would like to mention that whole of Deep Learning is based on the simple concept of Logistic Regression!

Happy Learning!

No comments:

Post a Comment

Learning - Machine Learning

It all started with a nudge in the Intelligent Algorithms class in my college days. IIT Delhi. My Alma mater. One of my close friends used ...