Lung cancer is one type of cancer with the highest death rate in the world. Smoking is the main risk factor that causes 20% of cancer deaths and 70% of lung cancer deaths in the world. However, people who do not smoke can also suffer from lung cancer, especially if they are frequently exposed to air pollution, live in an environment contaminated with dangerous substances, or have a family member who suffers from lung cancer. Early detection in the classification of lung cancer is an important factor in increasing the patient's chances of survival. Therefore, this study aims to classify lung cancer using the K-Nearest Neighbor algorithm. The K-Nearest Neighbor algorithm was chosen because in various studies it has a better level of accuracy compared to other supervised learning algorithms. To overcome data imbalance, the Random oversampling technique is used. Based on tests carried out using the Confusion Matrix, the results of measuring the performance values of Accuracy, Precision, Recall and f1-score using the K-Nearest Neighbor algorithm with Random oversampling technique, it can be concluded that the K-Nearest Neighbor algorithm received an Accuracy value of 0.99, Precision 0.99, Recall 0.99 and f1-score 0.99.
Copyrights © 2024