Hey everyone. Welcome back to Wi Fi fundamentals with location and analytics. This course will help you to muster the rssi fingerprint relies heavily on a data set that was mapped on a site survey. Yet it is still unreliable due to changes in the environment. people that walk over, there are lots of fluctuations. That's why we use a machine learning algorithm.
When planning your network for arranging and positioning, don't rely on your data set readings alone. Use the power of machine learning to get more accurate KNN k nearest neighbors is one of the simplest machine learning algorithm, yet one of the best for our purposes. Let's see how How It Works KNN algorithm is used for classification, we take a database in which the data points are separated into several classes and predict the classification or the type of the new sample point. In our example, we have a data in two dimensions. On the most top left corner, we have three blue circles, we will call them class one. On the button right corner, we have four red circles, which we will call them class two.
We will define the known figures the classes as a training data, one that we already have knowledge about. Suddenly, as if from nowhere appears another unknown figure. We will name it x How can we tell if it is a red circle or a blue circle? How can we classify it as red, or blue? k in KNN algorithm is the number of neighbors or reference points that we wish to take a vote from. Let's say k equals three.
The next step is to take measures to see who's closer to our unknown figure, three blue circles or four red circles. If we plot a circle around our objects with one reference point, then it seems that our x figure is the blue circle. If we run a circle around three reference points, k equals three, then it's obvious that our figure is a blue circle. The three closest figures to Unknown figure are blue circles. From our K factor we know that x is a blue circle, and not a red one. And object is classified by the majority vote of its members.
The KNN algorithm is based on feature similarity. How close is our simple figure resemble our training data set? In that way we can classify it. The bigger value k is, the more reliable the algorithm is and has a smaller error rate. For that to happen, we need more and more reference points. There are lots of examples where KNN is used.
One of them is credit, you're given a credit rating based on the similarity to people with a similar financial details and records. Another good usage for KNN is in our RSS fingerprint radio map. Our data set will never be perfect due to people walking in your space furniture moving, interferences are out there all the time. And we need algorithms to help us make a more accurate reading. Next up, we move to ranging based on time of arrival. See you soon