Liver disease in patients is on the rise due to environmental factors like toxic gas exposure, contaminated food, drug interactions, and excessive alcohol use. Therefore, diagnosing liver disease is crucial for saving lives and managing the condition effectively. In this paper, a new method called Liver Patients Detection Strategy (LPDS) is proposed for diagnosing liver disease in patients from laboratory data alone. The three main parts of LPDS are data preprocessing, feature selection, and detection. The data from the patient is processed, and any anomalies are removed during this stage. Then, during feature selection phase, the most helpful features are chosen. A novel method is proposed to choose the most relevant features during the feature selection stage. The formal name for this method is IB2OA, which stands for Improved Binary Butterfly Optimization Algorithm. There are two steps to IB2OA, which are; Primary Selection (PS) step and Final Selection (FS) step. This paper presents two enhancements. The first is Information Gain (IG) approach, which is used for initial feature reduction. The second is implementing BOA's initialization with Optimization Based on Opposition (OBO). Finally, five different classifiers, which are Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Naive Bayes (NB), Decision Tree (DT), and Random Forest (RF) are used to identify patients with liver disease during the detection phase. Results from a battery of experiments show that the proposed IB2OA outperforms the state-of-the-art methods in terms of precision, accuracy, recall, and F-score. In addition, when compared to the state-of-the-art, the proposed model's average selected features score is 4.425. In addition, among all classifiers considered, KNN classifier achieved the highest classification accuracy on the test dataset.