Method and device for constructing liver disease prediction model based on butterfly optimization and CatBoost

By applying the butterfly optimization algorithm in the CatBoost model to optimize the threshold and hyperparameters of the model, the problem of insufficient prediction performance of the CatBoost model when dealing with imbalanced categories of liver disease data sets is solved, the accuracy of liver disease prediction is improved, and early diagnosis and prevention.

CN119339961AInactive Publication Date: 2025-01-21HUAQIAO UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411884759.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-01-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the existing CatBoost model deals with category imbalance in the liver disease dataset, the model learning process tends toward the majority class, resulting in poor prediction performance for a few classes and affecting the prediction accuracy.

Method used

The binary category threshold and super -number of the Catboost model are optimized by using the butterfly optimization algorithm (BOA). The best model parameters are determined through the method of cross -discount cross -verification and maximizing the target function, and the prediction of liver diseases based on butterfly optimization and Catboost Model.

Benefits of technology

By optimizing the thresholds and hyperparameters of the model, the model's ability to identify minority categories is enhanced, the accuracy of liver disease prediction is improved, accurate prediction and classification of liver diseases is achieved, and early diagnosis and prevention are supported, which has important clinical application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339961A_ABST
    Figure CN119339961A_ABST
Patent Text Reader

Abstract

The invention provides a construction method and device of a hepatic disease prediction model based on butterfly optimization and CatBoost, and relates to the technical field of disease data analysis and processing. The method comprises the following steps: acquiring an unbalanced liver disease data set; dividing the preprocessed original data set into a training set and a test set by adopting a ten-fold cross validation method; then inputting the training set into a CatBoost model for training, optimizing a binary classification threshold value and a hyper-parameter of the CatBoost model by adopting a butterfly optimization algorithm, and obtaining an optimal model parameter when a set objective function is maximized; inputting the test set into a CatBoost model with optimal model parameters for test evaluation, and obtaining a constructed liver disease prediction model based on butterfly optimization and CatBoost; and inputting the newly obtained liver disease data set into the constructed prediction model for prediction to obtain a liver disease prediction result. According to the method, the problem that the CatBoost model is sensitive to selection of hyper-parameters can be solved, and an optimal classification result is achieved, so that the model prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disease data analysis and processing, and in particular to a method and device for constructing a liver disease prediction model based on butterfly optimization and CatBoost. Background Art

[0002] Studies have shown that adults with liver disease face challenges in healthcare affordability and accessibility, and have a 24% increased risk of death. Therefore, accurate prediction of liver disease is critical for early intervention to prevent liver disease.

[0003] Liver disease prediction uses various physical data of patients as data sources, and uses data mining, machine learning and other technologies to establish a mathematical model for liver disease prediction. Based on the established model, predictions are made about the patient's condition, which is conducive to the early detection and prevention of liver disease. Many machine models have shown good accuracy in predicting liver disease, and the CatBoost model has also been shown to achieve good results in predicting liver disease. However, the CatBoost model is sensitive to hyperparameter settings, especially when the categories in the data set are unbalanced, which causes the model to be biased towards the majority class during the learning process and has poor performance on the minority class, affecting the CatBoost model's ability to predict data.

[0004] In view of this, the applicant filed this application after studying the existing technology. Summary of the invention

[0005] The present invention aims to provide a method and device for constructing a liver disease prediction model based on butterfly optimization and CatBoost, so as to solve the problem of inaccurate prediction of liver disease caused by category imbalance in the data set in the existing method.

[0006] In order to solve the above technical problems, the present invention is implemented through the following technical solutions: A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost, comprising: S1, obtain the unbalanced liver disease dataset, i.e., the original dataset; S2, using the ten-fold cross validation method, the preprocessed original data set is divided into a training set and a test set; S3, inputting the training set into the CatBoost model for training, and optimizing the binary classification threshold and hyperparameters of the CatBoost model using the butterfly optimization algorithm, and obtaining the optimal model parameters when the set objective function is maximized; S4, inputting the test set into the CatBoost model with the optimal model parameters for test evaluation, and when the test evaluation result reaches the preset index, obtaining a constructed liver disease prediction model based on butterfly optimization and CatBoost; S5, input the newly acquired liver disease data set into the constructed liver disease prediction model based on butterfly optimization and CatBoost to perform prediction and obtain the liver disease prediction results.

[0007] Preferably, it is characterized in that the preprocessing is: Remove duplicate entries and data samples with non-numeric values; Then the data samples are randomly shuffled.

[0008] Preferably, the CatBoost model is N decision trees, each decision tree is a classifier; when the CatBoost model is trained, the weight error of the trained classifier is added to the training of the next tree classifier until the Nth tree.

[0009] Preferably, the maximization situation is: when the set objective function gradually converges and tends to be stable, or when the objective function value reaches the expected target, or when the number of iterations reaches the set maximum number of iterations.

[0010] Preferably, the objective function is expressed as: ; in, is the objective function, is the list of parameters to be optimized, namely the hyperparameters and binary classification thresholds of CatBoost. As the evaluation index, is a CatBoost model, X and y represent the input data and output data of the model respectively.

[0011] Preferably, when the objective function is maximized, that is, maximized , at this time The value is the optimal model parameter, and the expression is: ; in, is the optimal model parameter, that is, the optimal combination of hyperparameters and binary classification threshold; is the maximum value function.

[0012] Preferably, the expression for inputting the test set into the CatBoost model with the optimal model parameters for testing is: ; in, is the input test set data, is the optimal binary classification threshold.

[0013] Preferably, when evaluating the model, the accuracy, precision, recall, specificity, and F1 score are used according to the test results. And Matthews correlation coefficient MCC is evaluated, and the evaluation expression is: ; ; ; ; ; ; Among them, TP is the sample correctly classified as the positive class, TN is the sample correctly classified as the negative class, FP is the positive sample incorrectly classified as the negative class, and FN is the positive sample incorrectly classified as the negative class.

[0014] The present invention also provides a device for constructing a liver disease prediction model based on butterfly optimization and CatBoost, comprising: An acquisition unit is used to acquire an unbalanced liver disease dataset, i.e., an original dataset; The preprocessing unit is used to divide the preprocessed original data set into a training set and a test set by using a ten-fold cross validation method; A training unit, used for inputting the training set into the CatBoost model for training, and optimizing the binary classification threshold and hyperparameters of the CatBoost model using a butterfly optimization algorithm, and obtaining the optimal model parameters when the set objective function is maximized; A test evaluation unit, used for inputting the test set into the CatBoost model with the optimal model parameters for test evaluation, and when the test evaluation result reaches a preset index, a constructed liver disease prediction model based on butterfly optimization and CatBoost is obtained; The output unit is used to input the newly acquired liver disease data set into the constructed liver disease prediction model based on butterfly optimization and CatBoost to perform prediction and obtain the liver disease prediction results.

[0015] The present invention also provides a device for constructing a liver disease prediction model based on butterfly optimization and CatBoost, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement a method for constructing a liver disease prediction model based on butterfly optimization and CatBoost as described above.

[0016] The present invention also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a device where the computer-readable storage medium is located, a method for constructing a liver disease prediction model based on butterfly optimization and CatBoost as described above is implemented.

[0017] In summary, compared with the prior art, the present invention has the following beneficial effects: The present invention uses the Butterfly Optimization Algorithm (BOA) to optimize the binary classification threshold and hyperparameters of the CatBoost model to determine the optimal model parameters; the optimized CatBoost model is used for learning and testing to construct a liver disease prediction model based on butterfly optimization and CatBoost; finally, the established model is used to predict new liver disease data to identify liver disease risks. The model constructed using the method of the present invention can improve the accuracy of liver disease prediction, especially when dealing with imbalanced data sets, by optimizing the model's threshold and hyperparameters, the model's recognition ability for a minority of categories is enhanced, and the model can accurately predict and classify liver diseases, thereby achieving early diagnosis and prevention of liver diseases, which has important clinical application value.

[0018] The present invention adaptively and dynamically searches for the optimal prediction threshold of the model through the BOA algorithm. Compared with the method of using a fixed threshold, it can more fully capture the classification requirements in different situations, solve the problem that the CatBoost model is very sensitive to the selection of hyperparameters, and achieve the optimal classification result. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic diagram of a method for constructing a liver disease prediction model based on butterfly optimization and CatBoost provided in Example 1.

[0021] Figure 2 This is a structural diagram of the CatBoost model provided in Example 1.

[0022] Figure 3 A schematic diagram of a device for constructing a liver disease prediction model based on butterfly optimization and CatBoost provided in Example 2.

[0023] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] Embodiment 1 Embodiment 1 of the present invention provides a method for constructing a liver disease prediction model based on butterfly optimization and CatBoost, which can be implemented by a construction device based on butterfly optimization and CatBoost liver disease prediction model (hereinafter referred to as construction device), and in particular, executed by one or more processors in the construction device.

[0026] In this embodiment, the construction device may be an electronic device equipped with a processor, the processor having a computer program of the construction method based on butterfly optimization and CatBoost liver disease prediction model and the computer program can be executed, such as a computer, a smart phone, a smart tablet, a workstation, etc., which is not limited here.

[0027] With the successful use of machine learning models in a range of real-world applications, they have also been introduced for liver disease prediction. For example, Mai et al. utilized artificial neural networks (ANN) to diagnose liver cirrhosis, and their findings showed that ANN performed better in terms of prediction accuracy compared to logistic models. Devikanniga et al. applied support vector machines (SVM) to predict liver disease and achieved impressive prediction accuracy, reaching 99.49% accuracy on Indian liver disease data. Wu et al. demonstrated that the random forest (RF) algorithm outperformed other classification models, demonstrating its proficiency in discovering implicit and valuable correlations even in non-obvious indicator factors of disease categories. Chen et al. introduced the modified extreme gradient boosting (XGBoost) model, and their results validated the effectiveness of the model in predicting liver disease datasets from the UCI Machine Learning Repository. Given that CatBoost is effective for classification feature problems, Ye et al. applied CatBoost to assess the risk of complications in Chinese diabetic patients. Their findings showed that CatBoost outperformed RF in this case. However, machine learning models are sensitive to their hyperparameter settings. To overcome this challenge, many meta-heuristic optimization algorithms inspired by nature have been used to optimize these parameters. For example, particle swarm optimization (PSO) is used to search for hyperparameters of CatBoost for predicting the performance of middle school students. The CatBoost model has been shown to achieve good results in predicting liver disease, but the CatBoost model is sensitive to hyperparameter settings, which affects the CatBoost model's ability to predict data. Based on this, the present invention proposes a liver disease prediction model based on the butterfly optimization algorithm (BOA) and CatBoost, which optimizes the hyperparameters and binary classification thresholds of the CatBoost model through BOA to ensure that the optimal value is identified for liver disease prediction. The class imbalance problem in the liver disease dataset is solved by threshold-optimized CatBoost. Thereby, accurate prediction of liver disease is achieved.

[0028] In this embodiment, the CatBoost model is an efficient gradient boosting decision tree (GBDT) algorithm developed by Yandex, a Russian technology company. CatBoost is an optimized version of XGBoost and LightGBM, which builds a powerful ensemble model by training a series of weak learners (usually decision trees).

[0029] like Figure 1 As shown, a method for constructing a liver disease prediction model based on butterfly optimization and CatBoost includes steps S1 to S5.

[0030] S1, obtain the unbalanced liver disease dataset, i.e., the original dataset.

[0031] In this embodiment, a given imbalanced liver disease dataset is used as input to facilitate subsequent model training. Class imbalance means that in a dataset, the number of samples in one category is much larger than that in another category, which may cause the model to be biased towards the majority class and ignore the minority class.

[0032] S2, uses the ten-fold cross validation method to divide the preprocessed original data set into a training set and a test set.

[0033] In this embodiment, a 10-fold cross-validation method is used to divide the data set into a training set and a test set without setting a separate variable. The 10-fold cross-validation is to divide the data set into ten parts, and take nine of them as training data and one as test data in turn, and conduct ten experiments. Each experiment will obtain the corresponding accuracy (or error rate), and the average accuracy (or error rate) of the ten results is used as an estimate of the accuracy of the algorithm. The 10-fold cross-validation method is a commonly used model evaluation method, especially suitable for small data sets.

[0034] The preprocessing is to delete duplicate entries and data samples with non-numeric values ​​from the input data set; and then randomly shuffle the data samples.

[0035] S3, inputting the training set into the CatBoost model for training, and using the butterfly optimization algorithm to optimize the binary classification threshold and hyperparameters of the CatBoost model, and obtaining the optimal model parameters when the set objective function is maximized.

[0036] like Figure 2 As shown in the figure, the CatBoost model is N decision trees, each of which is a classifier. When training the CatBoost model, the weight error of the trained classifier is added to the training of the next tree classifier for weight correction until the Nth tree. The final prediction result of the model is the result of integrating N trees, thereby improving the performance of the model prediction result.

[0037] Furthermore, when the butterfly optimization algorithm is used to optimize the binary classification threshold and hyperparameters of the CatBoost model, the optimal model parameters are obtained when the objective function is maximized. The maximization situation is: when the set objective function gradually converges and tends to be stable (that is, the improvement gradually decreases, indicating that the model converges), or when the objective function value reaches the expected target (such as value reaches 0.9), or the number of iterations reaches the set maximum number of iterations (for example, the maximum number of iterations is set to 200).

[0038] Furthermore, the objective function is expressed as: ; in, is the objective function, is the list of parameters to be optimized, namely the hyperparameters and binary classification thresholds of CatBoost. As the evaluation index, is a CatBoost model, X and y represent the input data and output data of the model respectively.

[0039] When the objective function is maximized, , at this time The value is the optimal model parameter, and the expression is: ; in, is the optimal model parameter, that is, the optimal combination of hyperparameters and binary classification threshold; is the maximum value function.

[0040] The sample data is then put into the CatBoost model with optimal parameters for learning and training.

[0041] S4, inputting the test set into the CatBoost model with the optimal model parameters for test evaluation, when the test evaluation result reaches the preset index, obtaining the constructed liver disease prediction model based on butterfly optimization and CatBoost.

[0042] The model obtained by training the training set will be used to predict liver diseases by inputting the test set data into the model, and the model will make predictions by averaging the results of twenty experiments. The expression for testing the CatBoost model with the optimal model parameters is: ; in, is the input test set data, is the optimal binary classification threshold.

[0043] In traditional CatBoost models, gradient boosting trees are usually used to enhance the feature expression of the model. However, experimental results show that traditional gradient boosting methods perform poorly when dealing with unbalanced data sets, especially in liver disease prediction. Therefore, we propose a BOA-based adaptive threshold and hyperparameter optimization adjustment method to replace the original fixed threshold and manually adjusted hyperparameter setting method. This method can adaptively select the optimal threshold and hyperparameters and filter out settings that are not conducive to model performance, thereby improving the accuracy of prediction.

[0044] When evaluating the model, the accuracy, precision, recall, specificity, and F1 score are used according to the test results. The Matthews Correlation Coefficient (MCC) is evaluated using the following expression: ; ; ; ; ; ; Among them, TP is the sample correctly classified as the positive class, TN is the sample correctly classified as the negative class, FP is the positive sample incorrectly classified as the negative class, and FN is the positive sample incorrectly classified as the negative class.

[0045] Specifically, accuracy is used to evaluate the model's ability to correctly classify liver disease; precision is used to calculate the percentage of liver disease in cases classified as the disease; recall is used to calculate the algorithm's ability to correctly classify liver disease; F1 score is used to measure the harmonic mean of precision and recall; MCC is particularly useful when dealing with imbalanced data sets.

[0046] S5, input the newly acquired liver disease data set into the constructed liver disease prediction model based on butterfly optimization and CatBoost to perform prediction and obtain the liver disease prediction results.

[0047] In summary, compared with the prior art, the present invention has the following beneficial effects: The present invention is based on the BOA algorithm and can adaptively select the hyperparameters and classification thresholds of the CatBoost model, replacing manually adjusted hyperparameters and fixed threshold settings, thereby filtering out settings that are not conducive to model performance, improving the model's accurate prediction and classification of liver disease, and further achieving early diagnosis and prevention of liver disease, which has important clinical application value.

[0048] Embodiment 2 like Figure 3 As shown, the second embodiment of the present invention further provides a device for constructing a liver disease prediction model based on butterfly optimization and CatBoost, comprising: An acquisition unit is used to acquire an unbalanced liver disease dataset, i.e., an original dataset; The preprocessing unit is used to divide the preprocessed original data set into a training set and a test set by using a ten-fold cross validation method; A training unit, used for inputting the training set into the CatBoost model for training, and optimizing the binary classification threshold and hyperparameters of the CatBoost model using a butterfly optimization algorithm, and obtaining the optimal model parameters when the set objective function is maximized; A test evaluation unit, used for inputting the test set into the CatBoost model with the optimal model parameters for test evaluation, and when the test evaluation result reaches a preset index, a constructed liver disease prediction model based on butterfly optimization and CatBoost is obtained; The output unit is used to input the newly acquired liver disease data set into the constructed liver disease prediction model based on butterfly optimization and CatBoost to perform prediction and obtain the liver disease prediction results.

[0049] Embodiment 3 The third embodiment of the present invention also provides a device for constructing a liver disease prediction model based on butterfly optimization and CatBoost, which includes a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the method for constructing a liver disease prediction model based on butterfly optimization and CatBoost as described above.

[0050] Embodiment 4 The fourth embodiment of the present invention further provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a device where the computer-readable storage medium is located, the method for constructing a liver disease prediction model based on butterfly optimization and CatBoost as described above is implemented.

[0051] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0052] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0053] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code. It should be noted that in this article, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0054] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0055] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0056] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0057] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost, characterized in that: include: S1, obtain the unbalanced liver disease dataset, i.e., the original dataset; S2, using the ten-fold cross-validation method, the preprocessed original data set is divided into a training set and a test set; S3, inputting the training set into the CatBoost model for training, and optimizing the binary classification threshold and hyperparameters of the CatBoost model using the butterfly optimization algorithm, and obtaining the optimal model parameters when the set objective function is maximized; S4, inputting the test set into the CatBoost model with the optimal model parameters for test evaluation, and when the test evaluation result reaches the preset index, obtaining a constructed liver disease prediction model based on butterfly optimization and CatBoost; S5, input the newly acquired liver disease data set into the constructed liver disease prediction model based on butterfly optimization and CatBoost to perform prediction and obtain the liver disease prediction results.

2. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 1, characterized in that , the preprocessing includes: Remove duplicate entries and data samples with non-numeric values, and then randomly shuffle the data samples.

3. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 1, characterized in that , the CatBoost model is N decision trees, each decision tree is a classifier; when training the CatBoost model, the weight error of the trained classifier is added to the training of the next tree classifier until the Nth tree.

4. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 1, characterized in that ,The maximization situation is: when the set objective function gradually converges and tends to be stable, or when the objective function value reaches the expected target, or when the number of iterations reaches the set maximum number of iterations.

5. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 1, characterized in that , the expression of the objective function is: ; in, is the objective function, is the list of parameters to be optimized, namely the hyperparameters and binary classification thresholds of CatBoost. As the evaluation index, For the CatBoost model method, X and y represent the input data and output data of the model respectively.

6. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 5, characterized in that , when the objective function is maximized, that is, maximized , at this time The value is the optimal model parameter, and the expression is: ; in, is the optimal model parameter, that is, the optimal combination of hyperparameters and binary classification threshold; is the maximum value function.

7. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 6, characterized in that , the expression for testing the test set by inputting it into the CatBoost model with the optimal model parameters is: ; in, is the input test set data, is the optimal binary classification threshold.

8. A method for constructing a liver disease prediction model based on butterfly optimization and CatBoost according to claim 7, characterized in that When evaluating the model, we use the accuracy, precision, recall, specificity, and F1 score according to the test results. And Matthews correlation coefficient MCC is evaluated, and the evaluation expression is: ; ; ; ; ; ; Among them, TP is the sample correctly classified as the positive class, TN is the sample correctly classified as the negative class, FP is the positive sample incorrectly classified as the negative class, and FN is the positive sample incorrectly classified as the negative class.

9. A device for constructing a liver disease prediction model based on butterfly optimization and CatBoost, characterized in that: include: An acquisition unit is used to acquire an unbalanced liver disease dataset, i.e., an original dataset; The preprocessing unit is used to divide the preprocessed original data set into a training set and a test set by using a ten-fold cross validation method; A training unit, used for inputting the training set into the CatBoost model for training, and optimizing the binary classification threshold and hyperparameters of the CatBoost model using a butterfly optimization algorithm, and obtaining the optimal model parameters when the set objective function is maximized; A test evaluation unit, used for inputting the test set into the CatBoost model with the optimal model parameters for test evaluation, and when the test evaluation result reaches a preset index, a constructed liver disease prediction model based on butterfly optimization and CatBoost is obtained; The output unit is used to input the newly acquired liver disease data set into the constructed liver disease prediction model based on butterfly optimization and CatBoost to perform prediction and obtain the liver disease prediction results.

Citation Information

Patent Citations

  • Drug relocation method based on machine learning

    CN112837743A

  • KR20240157574A