KNN Algorithm
When do we use KNN algorithm? KNN can be used for both classification and regression predictive problems. However, it is more widely used in classification problems in the industry. To evaluate any technique we generally look at 3 important aspects: 1. Ease to interpret output 2. Calculation time 3. Predictive Power Let us take a few examples to place KNN in the scale : KNN algorithm fairs across all parameters of considerations. It is commonly used for its easy of interpretation and low calculation time. How does the KNN algorithm work? Let’s take a simple case to understand this algorithm. Following is a spread of red circles (RC) and green squares (GS) : You intend to find out the class of the blue star (BS) . BS can either be RC or GS and nothing else. The “K” is KNN algorithm is the nearest neighbors we wish to take vote from. Let’s say K = 3. Hence, we will now make a circle with BS as center just as big as to enclose only three data points on the p...
Comments
Post a Comment