Model fusion method and system for prognosis prediction of liver cirrhosis
By constructing a multi-classification model and calculating the fusion weight value, combined with a preset model fusion strategy, the problem of poor model fusion effect in the existing technology is solved, and the accuracy of prognosis prediction in patients with cirrhosis is improved.
Patent Information
- Application Number
- CN202411586167.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art adopts equal weight fusion method in the prognosis prediction of patients with cirrhosis, and fails to effectively consider the differences in the prediction performance of each model, resulting in poor model fusion effect and low accuracy of prediction results.
By obtaining the characteristic data and type tag data of patients with historical cirrhosis, the data set is constructed and divided into training sets and test sets. Multi-classification models are constructed based on LightGBM, XGBoost and CatBoost models, and the multi-classification logarithmic loss value and model fusion weight are calculated. The value is analyzed in combination with the preset model fusion strategy to obtain the model fusion prediction results.
The accuracy of model fusion prediction results is improved, and by taking into account the prediction performance differences of each model, it gives more accurate models greater weight, thereby providing better decision support.
Smart Images

Figure CN119475237A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the medical field, and in particular to a model fusion method and system for predicting the prognosis of liver cirrhosis. Background Art
[0002] Cirrhosis is a common chronic, progressive liver disease with a certain mortality rate. Using machine learning models to predict the prognosis of patients with cirrhosis is of great significance for clinical management and treatment decisions. Specifically, it is expected to predict the probability of cirrhosis patients surviving without liver transplantation within a certain period of time. 1. Probability of death without liver transplantation 2 and the probability of liver transplantation 3, and expect the prediction results to be as accurate as possible.
[0003] At present, the commonly used prediction method is the weighted fusion technology of multiple models. Specifically, for example: three models 1. Model 2. Model The fusion model is obtained by fusion of 3 equal weights , and using the fusion model To predict the prognosis of target patients, three models need to be used first. 1. Model 2. Model 3. Predict the target patients separately and get the probability of survival without liver transplantation as m1 , the probability of death without liver transplantation is m2 The probability of liver transplantation is m3 , where m=1, 2, 3, and then the fusion model is used The probability of the target patient surviving without liver transplantation is predicted to be , the probability of death without liver transplantation is The probability of liver transplantation is This prediction method has the following defects: (1) It adopts the equal-weight fusion method, which does not take into account the differences in the prediction performance of each model, and gives a larger weight to the relatively accurate model and a smaller weight to the relatively inaccurate model; (2) When each model is not sure that the sample belongs to a certain category, the fusion model only predicts that the sample belongs to this category; resulting in poor model fusion effect and low accuracy of the fusion model prediction results.
[0004] Therefore, a model fusion method and system for predicting the prognosis of liver cirrhosis was proposed. Summary of the Invention
[0005] Based on this, it is necessary to provide a model fusion method and system for predicting the prognosis of cirrhosis in response to the above technical problems.
[0006] According to a first aspect of the present invention, a model fusion method for predicting the prognosis of cirrhosis is provided, comprising: obtaining characteristic data and type label data of historical patients with cirrhosis; constructing a data set based on the characteristic data and type label data of historical patients with cirrhosis; randomly dividing the data set into a training set and a test set according to a preset ratio, constructing three multi-classification models, training and optimizing the three multi-classification models through the training set and the test set, and outputting the three trained multi-classification models; based on a preset multi-classification logarithmic loss formula, respectively calculating the three multi-classification logarithmic loss values of the three trained multi-classification models on the test set; based on a preset model fusion weight formula and the three multi-classification logarithmic loss values, respectively calculating the fusion weight values of the three trained multi-classification models; inputting the characteristic data of the target patient with cirrhosis into the three trained multi-classification models, respectively obtaining prediction results of the corresponding type labels; analyzing the prediction results of the corresponding type labels based on a preset model fusion strategy to obtain a model fusion prediction result.
[0007] Optionally, the characteristic data include: observation time characteristic data, D-penicillin characteristic data, age characteristic data, gender characteristic data, ascites characteristic data, hepatomegaly characteristic data, spider nevus characteristic data, edema characteristic data, bilirubin characteristic data, cholesterol characteristic data, albumin characteristic data, copper characteristic data, alkaline phosphatase characteristic data, alanine aminotransferase characteristic data, triglyceride characteristic data, platelet characteristic data, prothrombin time characteristic data and histological stage characteristic data, and the values of the type label data include: not having liver transplant and surviving, not having liver transplant and dying, and liver transplant.
[0008] Optionally, the three multi-classification models include: a first multi-classification model, a second multi-classification model and a third multi-classification model, the first multi-classification model adopts a LightGBM model, the second multi-classification model adopts an XGBoost model, and the third multi-classification model adopts a CatBoost model.
[0009] Optionally, the method of calculating the three multi-classification logarithmic loss values of the three trained multi-classification models on the test set based on the preset multi-classification logarithmic loss formula includes: calculating the multi-classification logarithmic loss values of the first multi-classification model, the second multi-classification model and the third multi-classification model on the test set based on the preset multi-classification logarithmic loss formula. 、 、 ; The multi-classification logarithmic loss formula is defined as ; Where N represents the number of historical cirrhosis patients in the test set; if the type label of the i-th historical cirrhosis patient in the test set is no liver transplant and survived, then , ; If the type label of the i-th historical cirrhosis patient in the test set is no liver transplant and death, then , ; If the type label of the i-th historical cirrhosis patient in the test set is liver transplantation, then , ;log represents natural logarithm; 、 、 They respectively represent the probability that the first multi-classification model, the second multi-classification model, and the third multi-classification model predict that the type label of the i-th historical cirrhosis patient in the test set is not liver transplanted and survives, the probability that the type label of the i-th historical cirrhosis patient in the test set is not liver transplanted and dies, and the probability that the type label of the i-th historical cirrhosis patient in the test set is liver transplanted.
[0010] Optionally, the fusion weight values of the three multi-classification models after training are calculated based on the preset model fusion weight formula and the three multi-classification logarithmic loss values, including: 、 、 , respectively calculate the fusion weight values of the first multi-classification model, the second multi-classification model, and the third multi-classification model; wherein the calculation formula of the fusion weight value of the first multi-classification model is as follows: Where: represents the fusion weight value of the first multi-classification model; the calculation formula of the fusion weight value of the second multi-classification model is as follows: Where: represents the fusion weight value of the second multi-classification model; the calculation formula of the fusion weight value of the third multi-classification model is as follows: Where: Represents the fusion weight value of the third multi-classification model.
[0011] Optionally, the characteristic data of the target cirrhosis patient are input into the three trained multi-classification models respectively, and a plurality of prediction results of the corresponding type labels are obtained respectively, including: inputting the characteristic data of the target cirrhosis patient into the first multi-classification model, the second multi-classification model and the third multi-classification model respectively after training, and obtaining the probability that the first multi-classification model, the second multi-classification model and the third multi-classification model predict that the type of the target cirrhosis patient is not a liver transplant and survives The probability that the target cirrhosis patient is not transplanted and dies , the probability that the target cirrhosis patient type is liver transplant , where k=1, 2, 3.
[0012] Optionally, the prediction results of the corresponding type labels are analyzed based on the preset model fusion strategy to obtain the model fusion prediction results, including: Strategy 1: If and and and , then let , Strategy 2: If and and and , then let , ; Strategy 3: If and and and , then let , ; Strategy 4: If strategy 1, strategy 2, and strategy 3 are not satisfied, then let , , Among them, 、 、 The model fusion prediction results of target cirrhosis patients are respectively used as represents the probability that the target cirrhosis patient is alive without liver transplantation, represents the probability that the target cirrhosis patient is not receiving liver transplantation and dies. Represents the probability that the target cirrhosis patient type is liver transplant.
[0013] According to a second aspect of the present invention, a model fusion system for predicting the prognosis of cirrhosis is provided, comprising: a data acquisition module for acquiring characteristic data and type label data of historical patients with cirrhosis; a dataset construction module for constructing a dataset based on the characteristic data and type label data of historical patients with cirrhosis; a model construction and training module for randomly dividing the dataset into a training set and a test set according to a preset ratio, constructing three multi-classification models, training and optimizing the three multi-classification models using the training set and the test set, and outputting the three trained multi-classification models; a multi-classification logarithmic loss calculation module for calculating three multi-classification logarithmic loss values of the three trained multi-classification models on the test set based on a preset multi-classification logarithmic loss formula; a fusion weight calculation module for calculating fusion weight values of the three trained multi-classification models based on a preset model fusion weight formula and the three multi-classification logarithmic loss values; a model prediction module for inputting the characteristic data of a target patient with cirrhosis into the three trained multi-classification models, respectively, to obtain prediction results for the corresponding type labels; and a model fusion analysis module for analyzing the prediction results for the corresponding type labels based on a preset model fusion strategy to obtain a model fusion prediction result.
[0014] According to a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.
[0015] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method are implemented.
[0016] The advantages and beneficial effects of the present invention are as follows: the present invention provides a model fusion method and system for predicting the prognosis of cirrhosis, which obtains the characteristic data and type label data of historical patients with cirrhosis and constructs a data set, randomly divides the data set into a training set and a test set according to a preset ratio, and constructs three multi-classification models based on the LightGBM model, the XGBoost model and the CatBoost model respectively, and uses the training set and the test set to train and optimize the three different multi-classification models respectively, thereby obtaining the three trained multi-classification models, and uses the multi-classification logarithmic loss formula and the model fusion weight formula to calculate the fusion weight values of the three multi-classification models, and uses the model fusion strategy to optimize the model output results when predicting the prognosis of the target patient with cirrhosis. Model fusion analysis not only considers the situation that the three multi-classification models are all convinced that the target cirrhosis patient belongs to a certain category during the model fusion analysis process, but also, when the probability that the three multi-classification models predict that the target cirrhosis patient belongs to a certain category is high enough and the average probability is also high enough, the probability of predicting that the target cirrhosis patient belongs to this category can be set to 1, and the probability of belonging to the other two categories can be set to 0, so that a quantitative and deterministic prediction can be made for this situation, rather than just the prediction probability. In addition, the differences in the prediction performance of each multi-classification model can be considered in the process of calculating the different fusion weights of the three multi-classification models, and a greater weight is given to the multi-classification model with accurate prediction results, so as to improve the accuracy of the model fusion prediction results, thereby providing better decision support for medical staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is the overall flow chart of the present invention.
[0018] Figure 2 This is a system principle block diagram of the present invention.
[0019] Figure 3 A schematic diagram of an electronic device. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0021] Example 1
[0022] Figure 1 This is a flowchart of a model fusion method for predicting the prognosis of liver cirrhosis provided in Example 1 of the present invention.
[0023] Reference Attachment Figure 1 , the method includes the following steps.
[0024] S1. Obtain feature data and type label data of historical patients with liver cirrhosis.
[0025] In this embodiment, the characteristic data of historical patients with cirrhosis include: observation time characteristic data, D-penicillin characteristic data, age characteristic data, gender characteristic data, ascites characteristic data, hepatomegaly characteristic data, spider nevus characteristic data, edema characteristic data, bilirubin characteristic data, cholesterol characteristic data, albumin characteristic data, copper characteristic data, alkaline phosphatase characteristic data, alanine aminotransferase characteristic data, triglyceride characteristic data, platelet characteristic data, prothrombin time characteristic data and histological stage characteristic data; the values of the type label data include: not liver transplanted and alive, not liver transplanted and died, liver transplanted.
[0026] It should be noted that for each patient with historical cirrhosis, 18 feature data and 1 type label data need to be obtained. The 18 feature data include observation time feature data, D-penicillin feature data, age feature data, gender feature data, ascites feature data, liver enlargement feature data, spider nevus feature data, edema feature data, bilirubin feature data, cholesterol feature data, albumin feature data, copper feature data, alkaline phosphatase feature data, alanine aminotransferase feature data, triglyceride feature data, platelet feature data, prothrombin time feature data and histological stage feature data, and the value of the 1 type label data is one of the following: not undergoing liver transplantation and surviving, not undergoing liver transplantation and dying, and liver transplantation.
[0027] S2. Construct a dataset based on the feature data and type label data of historical cirrhosis patients.
[0028] In this embodiment, before constructing the data set, feature coding preprocessing is also included for the D-penicillin feature data, gender feature data, ascites feature data, hepatomegaly feature data, spider nevus feature data and edema feature data contained in the feature data, wherein the feature coding preprocessing for the D-penicillin feature data is: if D-penicillin is used, the D-penicillin feature data is coded as 1, and if D-penicillin is not used, the D-penicillin feature data is coded as 0; the feature coding preprocessing for the gender feature data is: if the gender is male, the gender feature data is coded as 1, and if the gender is female, the gender feature data is coded as 0; the feature coding preprocessing for the ascites feature data is: if ascites occurs, the ascites feature data is coded as 1, and if ascites does not occur, the ascites feature data is coded as 0; the feature coding preprocessing for the hepatomegaly feature data is: if hepatomegaly occurs, the ascites feature data is coded as 1, and if ascites does not occur, the ascites feature data is coded as 0; The corresponding liver enlargement feature data is encoded as 1, and if there is no liver enlargement, the corresponding liver enlargement feature data is encoded as 0; the feature coding preprocessing of spider nevus feature data is: if spider nevus occurs, the spider nevus feature data is encoded as 1, and if there is no spider nevus, the spider nevus feature data is encoded as 0; the feature coding preprocessing of edema feature data is: if there is no edema without diuretics, the edema feature data is encoded as 0, if there is edema without diuretics or if edema is relieved with diuretics, the edema feature data is encoded as 1, and if there is edema with diuretics, the edema feature data is encoded as 2; it should be understood that only the above six feature data contained in the feature data are subjected to feature coding preprocessing, and the remaining feature data are not subjected to feature coding preprocessing, and a data set for training the model is constructed based on the encoded feature data, the unencoded feature data, and the type label data.
[0029] S3. Randomly divide the data set into training set and test set according to a preset ratio, build three multi-classification models, train and optimize the three multi-classification models through the training set and test set, and output the three trained multi-classification models.
[0030] In this embodiment, the data set is randomly divided into a training set and a test set in a ratio of 8:2, and three multi-classification models are constructed, wherein the three multi-classification models include: a first multi-classification model, a second multi-classification model and a third multi-classification model. The first multi-classification model adopts the LightGBM model, the second multi-classification model adopts the XGBoost model, and the third multi-classification model adopts the CatBoost model. The three multi-classification models are trained and optimized using the training set and the test set respectively, thereby obtaining the trained first multi-classification model, the second multi-classification model and the third multi-classification model. It should be noted that the first multi-classification model, the second multi-classification model and the third multi-classification model need to adopt three different multi-classification models, including but not limited to the above three multi-classification models, which can be flexibly selected according to actual conditions and are no longer limited here.
[0031] S4. Based on the preset multi-classification logarithmic loss formula, calculate the three multi-classification logarithmic loss values of the three trained multi-classification models on the test set.
[0032] In this embodiment, in order to obtain a more accurate model fusion effect, the multi-classification logarithmic loss formula can be used to calculate the multi-classification logarithmic loss values of the first multi-classification model, the second multi-classification model, and the third multi-classification model on the test set. 、 、 , if the calculated multi-classification logarithmic loss is smaller, the fusion weight value calculated later will be larger, thus obtaining a more accurate model fusion effect.
[0033] In this embodiment, based on the preset multi-classification logarithmic loss formula, three multi-classification logarithmic loss values of the three multi-classification models after training are calculated on the test set, including: based on the preset multi-classification logarithmic loss formula, the multi-classification logarithmic loss values of the first multi-classification model, the second multi-classification model and the third multi-classification model on the test set are calculated respectively. 、 、 ; The multi-classification logarithmic loss formula is defined as ; Where N represents the number of historical cirrhosis patients in the test set; if the type label of the i-th historical cirrhosis patient in the test set is no liver transplant and survived, then , ; If the type label of the i-th historical cirrhosis patient in the test set is no liver transplant and death, then , ; If the type label of the i-th historical cirrhosis patient in the test set is liver transplantation, then , ;log represents natural logarithm; 、 、 They respectively represent the probability that the first multi-classification model, the second multi-classification model, and the third multi-classification model predict that the type label of the i-th historical cirrhosis patient in the test set is not liver transplanted and survives, the probability that the type label of the i-th historical cirrhosis patient in the test set is not liver transplanted and dies, and the probability that the type label of the i-th historical cirrhosis patient in the test set is liver transplanted.
[0034] S5. Based on the preset model fusion weight formula and the three multi-classification logarithmic loss values, the fusion weight values of the three multi-classification models after training are calculated respectively.
[0035] In this embodiment, based on the preset model fusion weight formula and the three multi-classification logarithmic loss values, the fusion weight values of the three multi-classification models after training are calculated respectively, including: based on the preset model fusion weight formula and the three multi-classification logarithmic loss values 、 、 , respectively calculate the fusion weight values of the first multi-classification model, the second multi-classification model, and the third multi-classification model; wherein the calculation formula of the fusion weight value of the first multi-classification model is as follows: Where: represents the fusion weight value of the first multi-classification model; the calculation formula of the fusion weight value of the second multi-classification model is as follows: Where: represents the fusion weight value of the second multi-classification model; the calculation formula of the fusion weight value of the third multi-classification model is as follows: Where: Represents the fusion weight value of the third multi-classification model.
[0036] In this embodiment, by calculating the fusion weight values of the three multi-classification models, different weights are given to the three multi-classification models in the model fusion strategy. , , In this process, the differences in the prediction performance of each model are taken into account, so that more accurate models are given greater weights and relatively inaccurate models are given smaller weights; specifically, the more accurate the model, the smaller the calculated multi-classification logarithmic loss, and the larger the subsequent calculated fusion weight value, thus obtaining a more accurate model fusion effect.
[0037] S6. Input the characteristic data of the target cirrhosis patient into the three trained multi-classification models respectively, and obtain the prediction results of the corresponding type labels respectively.
[0038] In this embodiment, the characteristic data of the target cirrhosis patient are respectively input into the three trained multi-classification models to obtain prediction results of the corresponding type labels, including: inputting the characteristic data of the target cirrhosis patient into the trained first multi-classification model, the second multi-classification model and the third multi-classification model to obtain the probability that the first multi-classification model, the second multi-classification model and the third multi-classification model predict that the type of the target cirrhosis patient is not a liver transplant and survives. The probability that the target cirrhosis patient is not transplanted and dies , the probability that the target cirrhosis patient type is liver transplant , where k=1, 2, 3.
[0039] In this embodiment, the characteristic data of the target patient with cirrhosis, that is, the 18 characteristic data in step S1, are collected. Before inputting the 18 characteristic data into the three trained multi-classification models, it is necessary to perform feature coding preprocessing on the D-penicillin characteristic data, gender characteristic data, ascites characteristic data, hepatomegaly characteristic data, spider nevus characteristic data, and edema characteristic data among the 18 characteristic data. Subsequently, the remaining 12 characteristic data and the six characteristic data preprocessed with feature coding are input into the three trained multi-classification models to obtain prediction results of the corresponding type labels.
[0040] S7. Based on the preset model fusion strategy, the prediction results of the corresponding type labels are analyzed to obtain the model fusion prediction results.
[0041] In this embodiment, when performing fusion analysis on the prediction results of the three multi-classification models, a preset model fusion strategy is adopted, wherein the model fusion strategy includes four strategies, specifically: (1) Strategy 1: If and and and , then let , ; (2) Strategy 2: If and and and , then let , ; (3) Strategy 3: If and and and , then let , ; (4) Strategy 4: If strategies 1, 2, and 3 are not satisfied, then , , Among them, 、 、 The model fusion prediction results of target cirrhosis patients are respectively used as represents the probability that the target cirrhosis patient is alive without liver transplantation, represents the probability that the target cirrhosis patient is not receiving liver transplantation and dies. Represents the probability that the target cirrhosis patient type is liver transplant.
[0042] In this embodiment, based on strategies one to three, the situation where each model is convinced that the sample belongs to a certain category is considered respectively. When the three multi-classification models predict that the probability of the target cirrhosis patient belonging to a certain category is high enough, and the average probability is also high enough, then in the model fusion process, the probability of predicting that the target cirrhosis patient belongs to this category is set to 1, and the probability of belonging to the other two categories is set to 0, so that a quantitative and deterministic prediction can be made for this situation, rather than just a predicted probability; in addition, for 0.9 and 0.95 involved in strategies one to three, they can be flexibly set to other values according to actual needs and are no longer limited here; at the same time, after the model fusion strategy, the model fusion prediction results can be obtained, that is, the probability that the target cirrhosis patient is of the type that does not undergo liver transplantation and survives, the probability that the target cirrhosis patient is of the type that does not undergo liver transplantation and dies, and the probability that the target cirrhosis patient is of the type that undergoes liver transplantation.
[0043] Example 2
[0044] This embodiment provides a model fusion system 200 for predicting the prognosis of liver cirrhosis based on the above embodiment 1. Figure 2 , implementing a model fusion method for predicting the prognosis of cirrhosis as described in Example 1, the system includes a data acquisition module 210, a data set construction module 220, a model construction and training module 230, a multi-classification logarithmic loss calculation module 240, a fusion weight calculation module 250, a model prediction module 260 and a model fusion analysis module 270.
[0045] In this embodiment, the data acquisition module 210 is used to acquire characteristic data and type label data of historical liver cirrhosis patients.
[0046] In this embodiment, the data set construction module 220 is used to construct a data set based on the feature data and type label data of historical liver cirrhosis patients.
[0047] In this embodiment, the model construction and training module 230 is used to randomly divide the data set into a training set and a test set according to a preset ratio, construct three multi-classification models, train and optimize the three multi-classification models through the training set and the test set, and output the three trained multi-classification models.
[0048] In this embodiment, the multi-classification logarithmic loss calculation module 240 is used to calculate three multi-classification logarithmic loss values of the three trained multi-classification models on the test set based on a preset multi-classification logarithmic loss formula.
[0049] In this embodiment, the fusion weight calculation module 250 is used to calculate the fusion weight values of the three trained multi-classification models based on a preset model fusion weight formula and the three multi-classification logarithmic loss values.
[0050] In this embodiment, the model prediction module 260 is used to input the characteristic data of the target liver cirrhosis patient into the three trained multi-classification models respectively, and obtain prediction results of the corresponding type labels respectively.
[0051] In this embodiment, the model fusion analysis module 270 is used to analyze the prediction results of the corresponding type labels based on a preset model fusion strategy to obtain the model fusion prediction results.
[0052] Example 3
[0053] This embodiment further provides an electronic device based on the above embodiment 1. Figure 3 , Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0054] like Figure 3 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 302 or programs loaded from a storage device 308 into a random access memory (RAM) 303. RAM 303 also stores various programs and data required for the operation of the electronic device. Processing device 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.
[0055] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, etc., an output device 307 including, for example, a liquid crystal display (LCD), a speaker, etc., a storage device 308 including, for example, a magnetic tape, a hard disk, etc., and a communication device 309. The communication device 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0056] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0057] Example 4
[0058] Based on the above-mentioned embodiment 1, this embodiment further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned method are implemented.
[0059] It should be noted that in some embodiments of the present disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. Furthermore, in some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0060] In this embodiment, the client and server may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an adhoc peer-to-peer network), as well as any currently known or future developed network.
[0061] The computer-readable medium may be included in the apparatus or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the electronic device: obtains training data and converts the training data into initial data; determines an initial rule base based on the initial data and optimizes the parameters of the initial rule base to obtain a target rule base; calculates activation weights for the rules in the target rule base according to a preset activation weight calculation formula; and determines abnormal information based on the test data and the activation weights.
[0062] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0063] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing 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 than that marked in the accompanying drawings. For example, two boxes represented in succession 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 flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0064] The units described in some embodiments of the present disclosure may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes a data acquisition unit, a rule determination unit, a weight calculation unit, and an anomaly determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the data acquisition unit may also be described as a "unit for acquiring training data."
[0065] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0066] Obviously, those skilled in the art will appreciate that the various steps of the present invention described above can be performed in different ways than the present invention, and that simulation methods and experimental equipment include but are not limited to those described above. The various steps of the present invention described above can, in some cases, be performed in a different order than that shown here, and the steps shown or described above can be performed separately. Therefore, the present invention is not limited to any particular combination of hardware and software.
[0067] The above content is a further detailed description of the present invention in conjunction with specific embodiments, and the specific implementation of the present invention cannot be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.
Claims
1. A model fusion method for predicting the prognosis of liver cirrhosis, characterized in that: include: Obtain the characteristic data and type label data of historical cirrhosis patients; Construct a dataset based on the characteristic data and type label data of historical cirrhosis patients; The data set is randomly divided into a training set and a test set according to a preset ratio, three multi-classification models are constructed, the three multi-classification models are trained and optimized through the training set and the test set, and the three multi-classification models after training are output; Based on the preset multi-classification logarithmic loss formula, the three multi-classification logarithmic loss values of the three trained multi-classification models on the test set are calculated respectively; Based on the preset model fusion weight formula and the three multi-classification logarithmic loss values, the fusion weight values of the three multi-classification models after training are calculated respectively; The characteristic data of the target cirrhosis patients were respectively input into the three trained multi-classification models to obtain the prediction results of the corresponding type labels; Based on the preset model fusion strategy, the prediction results of the corresponding type labels are analyzed to obtain the model fusion prediction results.
2. The model fusion method for predicting the prognosis of liver cirrhosis according to claim 1, characterized in that: The characteristic data include: observation time characteristic data, D-penicillin characteristic data, age characteristic data, gender characteristic data, ascites characteristic data, liver enlargement characteristic data, spider nevus characteristic data, edema characteristic data, bilirubin characteristic data, cholesterol characteristic data, albumin characteristic data, copper characteristic data, alkaline phosphatase characteristic data, alanine aminotransferase characteristic data, triglyceride characteristic data, platelet characteristic data, prothrombin time characteristic data and histological stage characteristic data. The values of the type label data include: survival without liver transplantation, death without liver transplantation, and liver transplantation.
3. The model fusion method for predicting the prognosis of liver cirrhosis according to claim 1, characterized in that: The three multi-classification models include: a first multi-classification model, a second multi-classification model and a third multi-classification model. The first multi-classification model adopts the LightGBM model, the second multi-classification model adopts the XGBoost model, and the third multi-classification model adopts the CatBoost model.
4. The model fusion method for predicting the prognosis of liver cirrhosis according to claim 3, characterized in that: The three multi-classification logarithmic loss values of the three multi-classification models after training on the test set are calculated based on the preset multi-classification logarithmic loss formula, including: Based on the preset multi-classification logarithmic loss formula, the multi-classification logarithmic loss values of the first multi-classification model, the second multi-classification model, and the third multi-classification model on the test set are calculated respectively. , , ; The multi-classification logarithmic loss formula is defined as ; Where N represents the number of patients with historical cirrhosis in the test set; if the type label of the i-th patient with historical cirrhosis in the test set is no liver transplant and survived, then , ; If the type label of the i-th historical cirrhosis patient in the test set is no liver transplant and death, then , ; If the type label of the i-th historical cirrhosis patient in the test set is liver transplantation, then , ;log represents natural logarithm; , , They respectively represent the probability that the first multi-classification model, the second multi-classification model and the third multi-classification model predict that the type label of the i-th historical cirrhosis patient in the test set is not a liver transplant and is alive, the probability that the type label of the i-th historical cirrhosis patient in the test set is not a liver transplant and is dead, and the probability that the type label of the i-th historical cirrhosis patient in the test set is a liver transplant.
5. The model fusion method for predicting the prognosis of liver cirrhosis according to claim 4, characterized in that: The fusion weight values of the three multi-classification models after training are calculated based on the preset model fusion weight formula and the three multi-classification logarithmic loss values, including: Based on the preset model fusion weight formula and three multi-classification logarithmic loss values , , , respectively calculate the fusion weight values of the first multi-classification model, the second multi-classification model and the third multi-classification model; The calculation formula of the fusion weight value of the first multi-classification model is as follows: Where: Represents the fusion weight value of the first multi-classification model; The calculation formula of the fusion weight value of the second multi-classification model is as follows: Where: Represents the fusion weight value of the second multi-classification model; The calculation formula of the fusion weight value of the third multi-classification model is as follows: Where: Represents the fusion weight value of the third multi-classification model.
6. The model fusion method for predicting the prognosis of liver cirrhosis according to claim 5, characterized in that: The characteristic data of the target liver cirrhosis patient are respectively input into the three trained multi-classification models to obtain prediction results of the corresponding type labels, including: The characteristic data of the target cirrhosis patient are respectively input into the trained first multi-classification model, the second multi-classification model and the third multi-classification model, and the probability of the target cirrhosis patient being the type without liver transplantation and surviving is obtained by the first multi-classification model, the second multi-classification model and the third multi-classification model. , the probability that the target cirrhosis patient type is not transplanted and dies , the probability that the target cirrhosis patient type is a liver transplant ,in, k= 1, 2, 3.
7. The model fusion method for predicting the prognosis of liver cirrhosis according to claim 6, characterized in that: The prediction results of the corresponding type labels are analyzed based on the preset model fusion strategy to obtain the model fusion prediction results, including: Strategy 1: If and and and , then let , ; Strategy 2: If and and and , then let , ; Strategy 3: If and and and , then let , ; Strategy 4: If strategies 1, 2, and 3 are not satisfied, then , , ; Among them, , , The model fusion prediction results of the target liver cirrhosis patients are respectively used as represents the probability that the target cirrhosis patient type is not transplanted and survives, represents the probability that the target cirrhosis patient type is not transplanted and dies, Represents the probability that the target cirrhosis patient type is a liver transplant.
8. A model fusion system for predicting the prognosis of liver cirrhosis, characterized in that: include: A data acquisition module, used to acquire characteristic data and type label data of historical liver cirrhosis patients; A data set construction module, used to construct a data set based on the characteristic data and type label data of historical liver cirrhosis patients; The model building and training module is used to randomly divide the data set into a training set and a test set according to a preset ratio, build three multi-classification models, train and optimize the three multi-classification models through the training set and the test set, and output the three multi-classification models after training; A multi-classification logarithmic loss calculation module is used to calculate three multi-classification logarithmic loss values of the three trained multi-classification models on the test set based on a preset multi-classification logarithmic loss formula; A fusion weight calculation module is used to calculate the fusion weight values of the three multi-classification models after training based on a preset model fusion weight formula and three multi-classification logarithmic loss values; The model prediction module is used to input the characteristic data of the target liver cirrhosis patients into the three trained multi-classification models respectively, and obtain the prediction results of the corresponding type labels respectively; The model fusion analysis module is used to analyze the prediction results of the corresponding type labels based on the preset model fusion strategy to obtain the model fusion prediction results.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.