Implementation Of The K-Nearest Neighbor (KNN) Algorithm For Classification Of Obesity Levels

2020 ◽  
Vol 9 (2) ◽  
pp. 277
Author(s):  
Ayu Made Surya Indra Dewi ◽  
Ida Bagus Gede Dwidasmara

Obesity or overweight is a health problem that can affect anyone. In research in several journals, it was found that obesity can be influenced by many factors, but the most dominant factors are lifestyle and diet. Obesity should not only be considered as a consequence of an unhealthy lifestyle, but obesity is a disease that can lead to other dangerous diseases. Therefore, it is important to know the level of obesity in order to take early prevention. To determine the level of obesity, a classification method is used, namely K-Nearest Neighbor (KNN) to classify the level of obesity. In this study, classification was carried out with 16 test parameters, namely Gender, Age, Height, Weight, Family History With Overweight, FAVC, FCVC, NCP, CAEC, Smoke, CH2O, SCC, FAF, TUE, CALC, Mtrans and 1 class attribute, namely Nobesity. From tests carried out using the KNN algorithm, the results obtained are 78.98% accuracy with a value of k = 2. Keywords: Obesity, KNN, Classification

2019 ◽  
Vol 6 (6) ◽  
pp. 665
Author(s):  
Aditya Hari Bawono ◽  
Ahmad Afif Supianto

<p>Klasifikasi adalah salah satu metode penting dalam kajian data mining. Salah satu metode klasifikasi yang populer dan mendasar adalah k<em>-nearest neighbor</em> (kNN). Pada kNN, hubungan antar sampel diukur berdasarkan tingkat kesamaan yang direpresentasikan sebagai jarak. Pada kasus mayoritas terutama pada data berukuran besar, akan terdapat beberapa sampel yang memiliki jarak yang sama namun amat mungkin tidak terpilih menjadi tetangga, maka pemilihan parameter k akan sangat mempengaruhi hasil klasifikasi kNN. Selain itu, pengurutan pada kNN menjadi masalah komputasi ketika dilakukan pada data berukuran besar. Dalam usaha mengatasi klasifikasi data berukuran besar dibutuhkan metode yang lebih akurat dan efisien. <em>Dependent Nearest Neighbor</em> (dNN) sebagai metode yang diajukan dalam penelitian ini tidak menggunakan parameter k dan tidak ada proses pengurutan sampel. Hasil percobaan menunjukkan bahwa dNN dapat menghasilkan efisiensi waktu sebesar 3 kali lipat lebih cepat daripada kNN. Perbandingan akurasi dNN adalah 13% lebih baik daripada kNN.</p><p><em><strong>Abstract</strong></em></p><p class="Abstract"><em>Classification is one of the important methods of data mining. One of the most popular and basic classification methods is k-nearest neighbor (kNN). In kNN, the relationships between samples are measured by the degree of similarity represented as distance. In major cases, especially on big data, there will be some samples that have the same distance but may not be selected as neighbors, then the selection of k parameters will greatly affect the results of kNN classification. Sorting phase of kNN becomes a computation problem when it is done on big data. In the effort to overcome the classification of big data a more accurate and efficient method is required. Dependent Nearest Neighbor (dNN) as method proposed in this study did not use the k parameters and no sample at the sorting phase. The proposed method resulted in 3 times faster than kNN. The accuracy of the proposed method is13% better results than kNN.</em></p><p class="Judul2" align="left"><em> </em></p>


2017 ◽  
Vol 28 (5) ◽  
pp. 807-819 ◽  
Author(s):  
Weiying Guo ◽  
Yong Ji ◽  
Yong Luo ◽  
Yan Zhou

Abstract Aiming to realize rapid and efficient three-dimensional (3D) identification of substation equipment, this article proposes a new method in which the 3D identification of substation equipment is based on K-nearest neighbor (KNN) classification of subspace feature vector. First of all, the article uses octree encoding to reduce and denoise the point cloud data obtained by a 3D laser scanner. Secondly, position calibration and size standardization are used for the point cloud after pretreatment. Then, the normalized point cloud is divided into a number of cubes with same size. The cosine of the angle between the positive direction of z axis and a vector from the global centroid of the point cloud to the centroid of each subspace is regarded as the feature of the subspace. All cosines of subspaces constitute the feature of the point cloud. Finally, we classify the subspace feature vector by using the KNN algorithm and improve classification accuracy by using the particle swarm optimization algorithm. The simulation results show that the identification accuracy of the proposed method for unknown substation equipment is about 90% and the proposed method is applicable to low-degree losses. Apparently, this method can accurately identify 3D substation equipment. At the same time, increasing the number of subspaces will improve the accuracy; however, it will increase the recognition time.


Author(s):  
Andik Bintoro ◽  
Safwandi Safwandi

Classification of K Nearest Neighbors in this study to determine the grouping in seeing the suitability of the installed household electricity customers. Then the system built can see customers who want to know the amount of power given and want to add new. Conversely, if customers who want to reduce the power that has been given because it is too large with the condition of houses that are not large and not much use, can be seen in this system. The purpose of this study is to facilitate old customer customers in seeing the installed power with a variable amount of air conditioner (AC), number of refrigerators, number of washing machines and other electronic quantities based on the grouping of test data. first adjusted to the new test data. The process of the K-Nearest Neighbor method is to input the customer's name with the value of the amount of air conditioner (AC) with a value of 2, the number of refrigerators with a value of 2, the number of washing machines with a value of 1 and the number of other electronics with a value of 7. Then the data is seen with distance closest is 1.73205 by being trained by seeing neighbors nearby in training training. Furthermore, training of the data was obtained by customers with ID P-05 found in class C2 classifications. The results of this system are in the form of customer grouping which is categorized into 4 ampere, 6 ampere or 12 ampere category classification types, each of which is seen from the amount of power installed. This research is expected to help PLN customers of the city of Lhokseumawe in knowing the old customers who are included in the type of grouping.Keywords: Classification, Electrical Power, K-Nearest Neighbors


2019 ◽  
Vol 6 (1) ◽  
pp. 11 ◽  
Author(s):  
Rico Andrian ◽  
Devi Maharani ◽  
Meizano Ardhi Muhammad ◽  
Akmal Junaidi

Gita Persada Butterfly Park is the only breeding of engineered in situ butterflies in Indonesia. It is located in Lampung and has approximately 211 species of breeding butterflies. Each species of Butterflies has a different texture on its wings. The Limited ability of the human eye to distinguishing typical textures on butterfly species is the reason for conducting a research on butterfly identification based on pattern recognition. The dataset consists of 600 images of butterfly’s upper wing from six species: Centhosia penthesilea, Papilio memnon, Papilio nephelus, Pachliopta aristolochiae, Papilio peranthus and Troides helena. The pre-processing stage is conducted using scaling, segmentation and grayscale methods. The GLCM method is used to recognize the characteristics of butterfly images using pixel distance  and Angular direction 0o, 45o, 90o and 135o. The features used is angular second moment, contrast, homogeneity and correlation. KNN classification method in this study uses k values1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 and 23 based on the Rule of Thumb. The result of this study indicate that Centhosia penthesilea and Papilio nephelus classes can be classified properly compared to the other 4 classes and require a classification time of 2 seconds at each angular orientation. The highest accuracy is 91.1% with a value of  in the angle of 90o and error rate8.9%. Classification error occured because the value of the test data features is more dominant with the value of the training image features in different classes than the supposed class.  Another reason is because of imperfect test data.


2019 ◽  
Vol 6 (6) ◽  
pp. 665
Author(s):  
Aditya Hari Bawono ◽  
Ahmad Afif Supianto

<p>Klasifikasi adalah salah satu metode penting dalam kajian data mining. Salah satu metode klasifikasi yang populer dan mendasar adalah k<em>-nearest neighbor</em> (kNN). Pada kNN, hubungan antar sampel diukur berdasarkan tingkat kesamaan yang direpresentasikan sebagai jarak. Pada kasus mayoritas terutama pada data berukuran besar, akan terdapat beberapa sampel yang memiliki jarak yang sama namun amat mungkin tidak terpilih menjadi tetangga, maka pemilihan parameter k akan sangat mempengaruhi hasil klasifikasi kNN. Selain itu, pengurutan pada kNN menjadi masalah komputasi ketika dilakukan pada data berukuran besar. Dalam usaha mengatasi klasifikasi data berukuran besar dibutuhkan metode yang lebih akurat dan efisien. <em>Dependent Nearest Neighbor</em> (dNN) sebagai metode yang diajukan dalam penelitian ini tidak menggunakan parameter k dan tidak ada proses pengurutan sampel. Hasil percobaan menunjukkan bahwa dNN dapat menghasilkan efisiensi waktu sebesar 3 kali lipat lebih cepat daripada kNN. Perbandingan akurasi dNN adalah 13% lebih baik daripada kNN.</p><p><em><strong>Abstract</strong></em></p><p class="Abstract"><em>Classification is one of the important methods of data mining. One of the most popular and basic classification methods is k-nearest neighbor (kNN). In kNN, the relationships between samples are measured by the degree of similarity represented as distance. In major cases, especially on big data, there will be some samples that have the same distance but may not be selected as neighbors, then the selection of k parameters will greatly affect the results of kNN classification. Sorting phase of kNN becomes a computation problem when it is done on big data. In the effort to overcome the classification of big data a more accurate and efficient method is required. Dependent Nearest Neighbor (dNN) as method proposed in this study did not use the k parameters and no sample at the sorting phase. The proposed method resulted in 3 times faster than kNN. The accuracy of the proposed method is13% better results than kNN.</em></p><p class="Judul2" align="left"><em> </em></p>


Author(s):  
M. Jeyanthi ◽  
C. Velayutham

In Science and Technology Development BCI plays a vital role in the field of Research. Classification is a data mining technique used to predict group membership for data instances. Analyses of BCI data are challenging because feature extraction and classification of these data are more difficult as compared with those applied to raw data. In this paper, We extracted features using statistical Haralick features from the raw EEG data . Then the features are Normalized, Binning is used to improve the accuracy of the predictive models by reducing noise and eliminate some irrelevant attributes and then the classification is performed using different classification techniques such as Naïve Bayes, k-nearest neighbor classifier, SVM classifier using BCI dataset. Finally we propose the SVM classification algorithm for the BCI data set.


Author(s):  
Herman Herman ◽  
Demi Adidrana ◽  
Nico Surantha ◽  
Suharjito Suharjito

The human population significantly increases in crowded urban areas. It causes a reduction of available farming land. Therefore, a landless planting method is needed to supply the food for society. Hydroponics is one of the solutions for gardening methods without using soil. It uses nutrient-enriched mineral water as a nutrition solution for plant growth. Traditionally, hydroponic farming is conducted manually by monitoring the nutrition such as acidity or basicity (pH), the value of Total Dissolved Solids (TDS), Electrical Conductivity (EC), and nutrient temperature. In this research, the researchers propose a system that measures pH, TDS, and nutrient temperature values in the Nutrient Film Technique (NFT) technique using a couple of sensors. The researchers use lettuce as an object of experiment and apply the k-Nearest Neighbor (k-NN) algorithm to predict the classification of nutrient conditions. The result of prediction is used to provide a command to the microcontroller to turn on or off the nutrition controller actuators simultaneously at a time. The experiment result shows that the proposed k-NN algorithm achieves 93.3% accuracy when it is k = 5.


Mekatronika ◽  
2020 ◽  
Vol 2 (2) ◽  
pp. 1-12
Author(s):  
Muhammad Nur Aiman Shapiee ◽  
Muhammad Ar Rahim Ibrahim ◽  
Muhammad Amirul Abdullah ◽  
Rabiu Muazu Musa ◽  
Noor Azuan Abu Osman ◽  
...  

The skateboarding scene has arrived at new statures, particularly with its first appearance at the now delayed Tokyo Summer Olympic Games. Hence, attributable to the size of the game in such competitive games, progressed creative appraisal approaches have progressively increased due consideration by pertinent partners, particularly with the enthusiasm of a more goal-based assessment. This study purposes for classifying skateboarding tricks, specifically Frontside 180, Kickflip, Ollie, Nollie Front Shove-it, and Pop Shove-it over the integration of image processing, Trasnfer Learning (TL) to feature extraction enhanced with tradisional Machine Learning (ML) classifier. A male skateboarder performed five tricks every sort of trick consistently and the YI Action camera captured the movement by a range of 1.26 m. Then, the image dataset were features built and extricated by means of  three TL models, and afterward in this manner arranged to utilize by k-Nearest Neighbor (k-NN) classifier. The perception via the initial experiments showed, the MobileNet, NASNetMobile, and NASNetLarge coupled with optimized k-NN classifiers attain a classification accuracy (CA) of 95%, 92% and 90%, respectively on the test dataset. Besides, the result evident from the robustness evaluation showed the MobileNet+k-NN pipeline is more robust as it could provide a decent average CA than other pipelines. It would be demonstrated that the suggested study could characterize the skateboard tricks sufficiently and could, over the long haul, uphold judges decided for giving progressively objective-based decision.


Sign in / Sign up

Export Citation Format

Share Document