Result
This is a multi-calss classification process, and our goal is to acheive correct label when given a specific RSS and ohase information from the system. We use K-Nearest Neighbors (KNN) to achieve such a result. After implementing KNN on our trainning dataset, and plot the result using confusion matrix. The result is presented as follows.
As is shown in the confusion matrix, there are four labels 0, 1, 2, and 3, in correspondance with water, sugar water, salt water, and 2% Lactaid milk (lactose is decomposed into carbonhydrate). There is a major diagonal data entry in the confusion matrix, meaning most of the results are correctly labeled. However, we do see some misclassification. For example, lable 3, milk, is sometimes confused with label 1, sugar water, and label 2, salt water, is sometimes confused with fresh water. This confusion is not random and actually makes sense. The reasons are two fold.
- We use 2% Lactaid milk as our test subject, which contains organic matter and also sugar in carbonhydrate form due to decomposition and preprocessing of lactose. This may result in confusion between milk and sugar water.
- We use tap water in our experiment, which may contain unfiltered chemicals including all forms of salt, and this could be confused with our salt water content. Additionally, ionization process of salts will also result in lower attenuation, making the feature parameter similar to the water one.
in general, we have successfully device a system that helps identifying different liquid contents. This result is achieved by much cheaper and available devices compared with previous study, and such a process can also run on an Arduino, proving portability. We also demonstrate robustness by changing the container from plastic to glass for different measurements and the result are surprising for it still provides correct identification.