Abstract
In several nations, liver illnesses are now the deadliest illness. The number of people suffering from liver disease has been rising due to drug and alcohol abuse, inhaling toxic gasses, consuming contaminated food, and drinking alcohol. The goal of studying liver patient datasets was to create classification models that can accurately predict liver disease. By applying prediction and classification algorithms such as KNN and SVM to the publicly available patient liver dataset, we significantly reduced the effort required by the healthcare practitioners. By utilizing a dataset that included ten variables—such as age, gender, and other biochemical parameters we sought to precisely categories people as either liver patients or non-liver patients. The dataset included 7904 records for liver patients and 3173 records for non-liver patients generated from the global cohort of liver patients. We implemented two machine learning algorithms to test which gives more accurate results. Our investigation found that the KNN algorithm outperformed the SVM technique in predicting liver disease. Utilizing a proximity-based methodology, KNN exhibited superior ability in identifying underlying patterns within the dataset, leading to more accurate predictions. To sum up, our study demonstrated that KNN achieved higher accuracy of 0.89, recall of 0.95, and F1-score of 5508. These findings highlight KNN's superior reliability and precision in liver disease prediction using the given dataset and features. This means quicker findings, hence leading to better ill care and treatment plans. Through utilizing it doctors can make more informed judgements and enhance results for their patients.