Posts

5. kNN REGRESSION

Image
Hello world! This blog is about using kNN algorithm for regression. Please refer to my earlier blogs to get an insight about kNN. Supervised machine learning is one of the most commonly used and successful types of machine learning. We used supervised learning in the previous blog to classify flower iris into several species using physical measurements of the flower. Supervised learning is used when we want to predict a certain outcome of from a given input, and we have examples of input/output pairs. We build a machine learning model from the input/output pairs, which comprises our training set. Our goal in machine learning is to make accurate predictions for new never-before-seen data. Supervised learning often requires human effort to build the training set, but later it automates and speeds up an otherwise laborious or infeasible task. There are two major types of supervised machine learning problems, called classification and regression. In classification, the goal is

4. DEEPER INTO kNN (CLASSIFICATION USING kNN)

Image
Hello world! In this blog post I am going to discuss about kNN in details and finally make a model and optimize the accuracy. In my last blog post (Blog: 3), I created a model to predict iris of flowers with 97% accuracy. In this blog post I will dive deeper into the model and optimize it for more accuracy in prediction. k - nearest neighbor is a simple algorithm that stores all available cases and classifies the new data or case based on similarity measure. For example, if you are similar to your neighbours, you are one of them. If apple is similar to orange or melons or banana rather than monkey or chimpanzee then most likely Apple will be in group of fruits. In general, kNN is used in search application where you are looking for similar items. You might be wondering, what is k in kNN? Well, k denotes the number of nearest neighbour in voting class of the new data or the testing data. For example, if k = 3 the labels of the three closest classes are checked and the most common

3. INTRODUCTION TO ML WITH PYTHON USING kNN

Image
Machine learning is about extracting knowledge from data. In early days of "intelligent" applications, many systems used hand coded if - else decision statements to process data or adjust to user statements. Quite possibly the most important part in machine learning is understanding the data you are working with and how it relates to the problem you want to solve. No machine learning algorithm can make predictions on data for data for which it has no information. For instance, no machine learning algorithm can tell you the gender of a person just based on the last name of the person. It is because the data just does not contain the information. You might get lucky if you have the person's first name as it is generally easy to determine someone's gender based on first name. Therefore, it is necessary you understand the data before you begin building your model. Each and every ML algorithms are different are used for different purposes. The best practise is to keep i

2. MAIN CHALLENGES OF MACHINE LEARNING

Machine Learning involves two important things: an algorithm and data. These are the things that can go wrong. Insufficient quantity of training data is a drawback. For instance, if you show an apple to a kid, he will be able to recognise apples of all sizes and shapes. Machine learning is not quite there as of yet. The algorithm would need to be trained on a few thousand pictures of apples before it can recognise apples of all shapes and sizes. At times it can be observed that predictions presented by the ML algorithm doesn't quite match the reality. This problem occurs when the training data used was not representative of the cases you want to generalise. This hold true whether one uses instance - based learning or model - based learning algorithms. Using data representative of the cases you want to generalise is trickier than it sounds because small sample will introduce sampling noise (i.e., non-representative data as a result of chance  ). On the other hand, very large samp

1. AN OVERVIEW OF MACHINE LEARNING

Image
In recent days, when people hear about machine learning, they tend to think of a terminator trying to destroy human species! Trust me we are nowhere near building that kind of robot as of yet. Had it been possible, we would have solved artificial intelligence. Well, its a long way down the lane, if we ever can solve AI. Machine learning has been around for decades. Previously, it was used in very specialised programs like the optical character reader (OCR). Machine learning techniques became quite popular and mainstream during the 1990 when it was used for spam e-mail detections. It was pretty good at it! The spam filter isn’t exactly a self aware skynet, but it does technically qualify as Machine Learning. It has actually learned so well, we seldom have to mark any email as spam. This followed the development of 100s of other ML application that now quietly power things like voice recognition and better search recommendation. An engineering oriented definition of