Method, device, electronic device and storage medium for predicting patient hospitalization duration
An ordered multi-class prediction model is constructed through the cascade connection of multiple binary class base learners, which solves the problems of low accuracy and data imbalance in the existing technology, and improves the accuracy of predicting the length of stay of patients and the ability to assist clinical decision-making. .
Patent Information
- Application Number
- CN202011136028.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-10-22
AI Technical Summary
Existing prediction methods for patient length of stay rely on doctors' experience, have low accuracy, and cannot effectively assist clinical decision-making. Moreover, numerical prediction models have large errors and cannot effectively solve the problem of data imbalance between categories in ordered multi-class data.
Multiple binary classification base learners are used to cascade and concatenate to build an ordered multi-classification prediction model. The base learners are trained through the gradient boosting decision tree algorithm, and expert knowledge is combined to screen prediction features. Random hyperparameter search and five-fold cross-validation optimization are used. Hyperparameters, split the data set layer by layer to balance category data, and build a cascade layer-by-layer modeling algorithm.
It improves the accuracy of predicting the length of stay of patients, retains the sequential progressive relationship between categories, solves the problem of data imbalance, enhances the performance of the prediction model, and assists clinical decision-making and medical resource allocation.
Smart Images

Figure CN112365943B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for predicting the length of hospital stay of a patient. Background Art
[0002] Length of hospital stay is a key indicator for evaluating the efficiency of medical resource utilization. An intelligent length of hospital stay prediction system can assist clinicians in identifying patients with higher disease risks and provide timely medical intervention, thereby improving patients' hospitalization prognosis. It can also assist doctors in rationally arranging limited medical resources to maximize the efficiency of medical resource utilization. It can also provide patients and their families with information consultation related to length of hospital stay in the early stages of hospitalization, so that patients and their families can have more information about their condition and possible hospitalization situations, thereby improving patients' satisfaction with medical services and reducing doctor-patient conflicts caused by information asymmetry.
[0003] Taking kidney disease as an example, chronic kidney disease is a group of common chronic diseases caused by various primary kidney diseases and kidney damage caused by diabetes, hypertension, etc. my country's kidney disease medical and health care system urgently needs to be combined with an intelligent clinical decision support system to improve medical efficiency and improve patient prognosis.
[0004] Existing predictions of patient hospitalization duration are generally based on the work experience of clinical doctors. Due to the complexity of the patient's condition and the high subjectivity of the doctor's work experience, the prediction of patient hospitalization duration is difficult, the analysis efficiency is low, and the accuracy is low. It cannot effectively assist doctors in clinical decision-making and improve medical efficiency.
[0005] Considering that the length of hospital stay in the real world is affected by human factors and has certain volatility, the prediction model of the numerical length of hospital stay accurate to the day often has large errors. By converting the prediction of the length of hospital stay from a numerical prediction problem to an ordered multi-classification prediction problem, the differences in patient characteristics between each classification group are more typical, which can improve the prediction accuracy of the model, and the classification results can provide sufficient information for clinical decision support and patient consultation. At present, the ordered multi-classification problem is generally solved based on a numerical prediction model or an unordered multi-classification prediction model: the numerical prediction model assumes that the multiple categories of the outcome variable follow a geometric correlation relationship, while the multiple categories of the ordered multi-classification data in the real world often do not follow a strict geometric correlation relationship; the unordered multi-classification prediction model directly ignores the progressive relationship between the categories of the ordered multi-classification outcome variable, and the performance of the prediction model is often subject to certain limitations. At the same time, when there is a data imbalance problem between the categories of the ordered multi-classification outcome variable, the unordered multi-classification prediction model will produce a large prediction error. Summary of the invention
[0006] The purpose of the present application is to provide a method, device, electronic device and storage medium for predicting the length of hospital stay of a patient. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0007] According to one aspect of an embodiment of the present application, a method for predicting a patient's hospital stay is provided, comprising:
[0008] Use multiple binary classification base learners to cascade and construct an ordered multi-classification prediction model;
[0009] Using the training data set to train each of the base learners until each of the base learners meets the performance index requirement, thereby obtaining a trained prediction model;
[0010] According to the preset prediction features, samples to be predicted are selected and input into the trained prediction model to obtain prediction results.
[0011] Furthermore, before using the training data set to train each of the base learners, the prediction method further includes:
[0012] Based on the electronic medical record data of patients in the hospital information management system, data cleaning is performed and training data is extracted to form a training data set.
[0013] Furthermore, before selecting a sample to be predicted and inputting it into the trained prediction model according to the preset prediction feature, the prediction method further includes:
[0014] Screening out prediction features with high prediction value for the length of hospital stay of the patient from the electronic medical record data of the hospital information management system or from the training data set;
[0015] The screened prediction features are supplemented and adjusted in combination with expert knowledge to obtain preset prediction features.
[0016] Furthermore, the data cleaning includes:
[0017] Patient data with too high missing rates were removed, abnormal data were removed, and missing values were randomly filled.
[0018] Furthermore, the binary classification base learner is a gradient boosting decision tree algorithm.
[0019] Furthermore, the using of the training data set to train each of the binary classification base learners until each of the binary classification base learners meets the performance index requirement includes:
[0020] S1. Input the training data set into the prediction model, set the initial value m=1; the input format of a single training sample is (x, y); y is an outcome variable containing ordered M categories, x represents a set of prediction features of the training sample; M is the number of classification categories of the prediction model;
[0021] S2, determine whether m < M; if so, proceed to step S3; if not, jump to step S7;
[0022] S3, extracting the data of y≥mth category as the training data subset of the mth base learner;
[0023] S4, marking the data of y=mth category in the training data subset with a first training label, and marking the data of y>mth category in the training data subset with a second training label;
[0024] S5. Based on the training data subset and training labels obtained in the above steps, train the binary classification base learner to obtain the mth base learner;
[0025] S6, m is incremented by 1 and updated, and the process returns to step S2;
[0026] S7. Output the trained M-1 base learners.
[0027] Furthermore, random hyperparameter search combined with five-fold cross-validation method is used to achieve hyperparameter optimization of each base learner, and the F1 score is used as a reference indicator for the model prediction performance of hyperparameter optimization.
[0028] Furthermore, the prediction method further includes:
[0029] Based on the update of electronic medical record data in the hospital information management system, the prediction model is updated synchronously and regularly.
[0030] According to another aspect of an embodiment of the present application, a device for predicting the length of hospital stay of a patient is provided, comprising:
[0031] A construction module is used to construct an ordered multi-classification prediction model by cascading multiple binary classification base learners;
[0032] A training module, used for training each base learner using a training data set until each base learner meets the performance index requirement, thereby obtaining a trained prediction model;
[0033] The prediction module is used to select samples to be predicted according to preset prediction features and input them into the trained prediction model to obtain prediction results.
[0034] According to another aspect of an embodiment of the present application, 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 executes the program to implement the above-mentioned method for predicting the length of hospital stay of a patient.
[0035] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and the program is executed by a processor to implement the above-mentioned method for predicting the length of hospital stay of a patient.
[0036] The technical solution provided by one aspect of the embodiments of the present application may have the following beneficial effects:
[0037] The method for predicting the length of hospital stay of patients provided in the embodiment of the present application utilizes a plurality of binary classification base learners to be cascaded in series to construct an ordered multi-classification prediction model, splits the ordered multi-classification prediction task into several progressive binary classification tasks, and each layer has a base learner. The information of the sample to be predicted is input into each trained base learner layer by layer to obtain the predicted category. The sequential progressive relationship between each category in the ordered multi-classification outcome variable is retained, and the geometric proportional relationship between the ordered categories is not assumed, which is more in line with the characteristics of real data. By splitting the data set layer by layer, the data of the two categories in the data set used for training the base learners at each layer are relatively balanced, which can effectively solve the problem of data imbalance between multiple categories and improve the accuracy of the prediction results.
[0038] Other features and advantages of the present application will be described in the subsequent description, and part of them will become apparent from the description, or some of them can be inferred or determined without doubt from the description, or understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flow chart showing a method for predicting the length of hospital stay of a patient according to an embodiment of the present application is shown;
[0041] Figure 2 A flow chart of the training process of a base learner in one embodiment of the present application is shown;
[0042] Figure 3 A flowchart of selecting a sample to be predicted and inputting it into a trained prediction model to obtain a prediction result in one embodiment of the present application is shown;
[0043] Figure 4 A structural block diagram of a device for predicting the length of hospital stay of a patient provided by another embodiment of the present application is shown;
[0044] Figure 5 A structural block diagram of an electronic device provided by another embodiment of the present application is shown;
[0045] Figure 6 A structural block diagram of an intelligent system for predicting the length of hospital stay of patients with kidney diseases provided by another embodiment of the present application is shown. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0047] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0048] like Figure 1 As shown, an embodiment of the present application provides a method for predicting the length of hospital stay of a patient, comprising the following steps:
[0049] S1. Collect effective modeling data.
[0050] This embodiment takes kidney disease patients as an example. Those skilled in the art will appreciate that the method of this embodiment is not limited to kidney disease patients, but can also be used to predict the length of hospital stay for patients with other diseases. Based on the electronic medical record data of kidney disease patients in the hospital information management system, after data cleaning, effective modeling data is extracted. The modeling data is the training data used to train the base learner.
[0051] Electronic medical record data from the hospital information management system were collected, and patients with kidney disease were screened out based on the chronic kidney disease diagnostic criteria given by the internationally accepted KDIGO kidney disease clinical guidelines. Patient data, characteristic indicators, and data outliers with information missing rates exceeding 30% were deleted and not included in the final model construction. The missing values of the data were filled with a random filling algorithm, which can ensure that the filled data maintain the distribution characteristics of the real data. Valid modeling data were extracted and used to form a modeling database.
[0052] S2. Screening prediction features.
[0053] Combining expert knowledge with feature screening algorithms, a certain number of predictive features with high predictive value and convenient for collection in clinical practice are screened out from the modeling database to form a feature subset for modeling.
[0054] A set of predictive features is extracted from the electronic medical record data in the hospital information management system, wherein the predictive feature set includes: demographic characteristics, kidney disease characteristics, medical treatment characteristics, general disease characteristics, laboratory test index characteristics, etc.
[0055] 1) Demographic characteristics include: age, gender, marital status, occupation, education level, medical insurance type and other parameter data;
[0056] 2) Kidney disease characteristics include: chronic kidney disease stage, primary kidney disease, kidney disease diagnosis year and other parameter data;
[0057] 3) Medical treatment characteristics include: type of medical institution, number of hospitalizations, admission status, admission route, admission department and other parameter data;
[0058] 4) General disease characteristics include: cause of admission, whether there are comorbidities (diabetes, hypertension, tumors, chronic obstructive pulmonary disease, lung infection, cardiovascular disease, cerebrovascular disease, chronic liver disease) and other parameter data;
[0059] 5) Laboratory test index characteristics include: blood routine, urine routine, urine protein / creatinine, blood creatinine, blood sugar, blood lipids, electrolytes, blood calcium, blood phosphorus, intact parathyroid hormone and other parameter data.
[0060] A recursive feature elimination algorithm was used to screen out a certain number of predictive feature subsets with high predictive value for the length of hospital stay of patients with kidney disease; secondly, the screened predictive feature subsets were supplemented and adjusted in combination with expert knowledge. Feature selection that combines expert knowledge with feature screening algorithms is conducive to ensuring the accuracy of screening features and the feasibility of clinical practice. Feature screening can reduce the complexity of the prediction model and facilitate clinical practice.
[0061] S3. Build a prediction model.
[0062] Multiple binary classification base learners are cascaded to build an ordered multi-classification prediction model.
[0063] Specifically, the hospitalization time of patients with kidney disease is divided into M categories from low to high, and the prediction feature subset screened in step S2 is used as the input of the prediction model. The cascaded layer-by-layer modeling algorithm is adopted, and the gradient boosting decision tree algorithm is used as the base learner to construct a prediction model for the hospitalization time of patients with kidney disease; wherein, the hyperparameter optimization of each base learner adopts a random hyperparameter search combined with a five-fold cross-validation method, and the F1 score is used as a reference indicator for the model prediction performance of the hyperparameter optimization.
[0064] S4. Using the training data set to train each of the base learners until each of the base learners meets the performance index requirement, thereby obtaining a trained prediction model.
[0065] The basic structure of the cascaded layer-by-layer modeling algorithm of this embodiment adopts a multi-level integrated architecture, which is composed of a plurality of binary classification base learners cascaded in series, and a base learner is trained in each layer. The ordered M-classification prediction model includes M-1 base learners. M is the number of classification categories of the prediction model.
[0066] Arrange the M categories of the outcome variable in ascending order. For the mth (m=1, 2, ..., M-1)th base learner, its training data subset is the data of y≥mth category.
[0067] Given a training data set D, the input format of a single training sample is (x, y). Among them, y is an outcome variable containing ordered M categories. The M categories of the outcome variable are arranged in ascending order to obtain the first category < the second category <... < the mth category <... < the Mth category; x represents the set of prediction features of the training sample.
[0068] like Figure 2 As shown, in some embodiments, the training process of the base learner includes the following steps:
[0069] S11, input training data set D, set initial value m=1;
[0070] S12, determine whether m < M: if so, go to step S13; if not, jump to step S17;
[0071] S13, extracting a training data subset: extracting data of y≥mth category as a training subset of the mth base learner;
[0072] S14, marking data labels: the training labels of the data with y=mth category in the extracted training data subset are recorded as 0, and the training labels of the data with y>mth category are recorded as 1;
[0073] S15, training base learner: based on the training data subset and data labels extracted in the above steps, training a preset binary classification base learner, thereby obtaining the mth base learner;
[0074] S16, m is incremented by 1 and updated, and the process returns to step S12; that is, m=m+1 or m=m++;
[0075] S17. Output the trained M-1 base learners.
[0076] Among them, random hyperparameter search combined with five-fold cross-validation method is used to achieve hyperparameter optimization of each base learner, and F1 score is used as a reference indicator for model prediction performance of hyperparameter optimization.
[0077] S5. According to the preset prediction features, select the sample to be predicted and input it into the trained prediction model to obtain the prediction result.
[0078] The sample to be predicted is input into the prediction model to obtain the prediction result. In some embodiments, the prediction result is also visualized.
[0079] The information of newly admitted patients is input into the hospital stay prediction model to obtain the prediction results, visualize the prediction results and treatment recommendations, and give a visualization of the impact of the patient's prediction characteristics on his or her hospital stay based on the SHAP algorithm.
[0080] The information of the new sample to be predicted is input into each trained base learner layer by layer until its predicted category is obtained and output.
[0081] In certain embodiments, Figure 3 As shown, step S5 specifically includes:
[0082] S51, input the information of the sample to be predicted, and set the initial value m=1;
[0083] S52, determine whether m is less than M: if so, input the sample information into the trained mth base learner to obtain an output of 0 or 1;
[0084] S53, if the output is 0, the final predicted category of the sample is the mth category, and the process jumps to step S55; if the output is 1, m is incremented by 1 and updated (i.e., the operation m=m+1 is executed), and the process goes to step S54;
[0085] S54, determine whether m is equal to M: if so, the final predicted category of the sample is the Mth category, and jump to step S55; if not, return to step S52;
[0086] S55: Output the final predicted category of the sample.
[0087] S6. Automatically update the prediction model.
[0088] Based on the update of data collected by the hospital's electronic medical record data management system, the hospitalization duration prediction model is updated regularly and synchronously.
[0089] Based on the update of data collected by the hospital's electronic medical record data management system, the modeling data is updated at the end of each year based on the system data of the past three years. A new hospital stay prediction model is constructed according to the method described in step S3, and the updated hospital stay prediction model is used to replace the historical prediction model, thereby achieving regular and synchronous updating of the hospital stay prediction model.
[0090] The patient hospitalization duration prediction method of the embodiment of the present application is based on the cascaded layer-by-layer modeling algorithm of ordered multi-classification prediction, adopts a multi-level integrated architecture, and is composed of multiple base learners cascaded in series. It is suitable for prediction problems with ordered multi-classifications and the categories do not follow a geometric correlation relationship or there is data imbalance between the categories. The method provided by the embodiment of the present application splits the prediction task of ordered multi-classifications into several progressive binary classification tasks, and trains a base learner for each layer. The information of the new sample to be predicted is input into each trained base learner layer by layer until its predicted category is obtained and output. The cascaded layer-by-layer modeling algorithm retains the sequential progressive relationship between the categories in the ordered multi-classification outcome variable, and does not assume that the ordered categories are in a geometric relationship, which is more in line with the characteristics of real data. In addition, by splitting the data set layer by layer, the data of the two categories in the data set used for training the base learners of each layer are relatively balanced, which can effectively solve the problem of data imbalance between multiple categories.
[0091] like Figure 4 As shown, another embodiment of the present application provides a device for predicting the length of hospital stay of a patient, comprising:
[0092] A construction module 30 is used to construct an ordered multi-classification prediction model by cascading multiple binary classification base learners;
[0093] A training module 40, used for training each of the base learners using a training data set until each of the base learners meets the performance index requirement, thereby obtaining a trained prediction model;
[0094] The prediction module 50 is used to select samples to be predicted according to preset prediction features and input them into the trained prediction model to obtain prediction results.
[0095] In some embodiments, the prediction device further includes a data extraction module 10, which is used to perform data cleaning based on the electronic medical record data of patients in the hospital information management system before using the training data set to train each base learner, and extract training data to form a training data set.
[0096] In some embodiments, the prediction device further includes a prediction feature acquisition module 20, which is used to select a sample to be predicted according to a preset prediction feature and input it into the trained prediction model before:
[0097] Screening out prediction features with high prediction value for the length of hospital stay of the patient from the electronic medical record data of the hospital information management system or from the training data set;
[0098] The screened prediction features are supplemented and adjusted in combination with expert knowledge to obtain preset prediction features.
[0099] In some embodiments, the data extraction module 10 includes a cleaning unit for performing data cleaning, and the cleaning unit is specifically used to:
[0100] Patient data with too high missing rates were removed, abnormal data were removed, and missing values were randomly filled.
[0101] The binary classification base learner is the gradient boosting decision tree algorithm.
[0102] In some embodiments, the training module 40 is specifically configured to:
[0103] S11, input the training data set into the prediction model, set the initial value m=1; the input format of a single training sample is (x, y); y is an outcome variable containing ordered M classifications, x represents a set of prediction features of the training sample; M is the number of classification categories of the prediction model;
[0104] S12, determine whether m < M; if so, proceed to step S13; if not, jump to step S17;
[0105] S13, extracting data of y≥mth category as the training data subset of the mth base learner;
[0106] S14, labeling the data of y=mth category in the training data subset with a first training label, and labeling the data of y>mth category in the training data subset with a second training label;
[0107] S15, based on the training data subset and training labels obtained in the above steps, training the binary classification base learner to obtain the mth base learner;
[0108] S16, m is incremented by 1 and updated, and the process returns to step S12;
[0109] S17. Output the trained M-1 base learners.
[0110] In certain embodiments, the training module 40 is further configured to optimize the hyperparameters of each base learner by using a random hyperparameter search combined with a five-fold cross validation method, and use the F1 score as a reference indicator for the model prediction performance of the hyperparameter optimization.
[0111] In some embodiments, the prediction device further includes an updating module 60, and the updating module 60 is used to periodically and synchronously update the prediction model based on the update of the electronic medical record data in the hospital information management system.
[0112] Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-mentioned method for predicting the length of hospital stay of a patient. Figure 5 As shown, in some embodiments, the electronic device 70 may include: a processor 700, a memory 701, a bus 702 and a communication interface 703, and the processor 700, the communication interface 703 and the memory 701 are connected via the bus 702; the memory 701 stores a computer program that can be run on the processor 700, and when the processor 700 runs the computer program, it executes the method for predicting the patient's hospitalization time provided in any of the aforementioned embodiments of the present application.
[0113] Another embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the above-mentioned method for predicting the length of hospital stay of a patient.
[0114] like Figure 6 As shown, another embodiment of the present application provides an intelligent prediction system for hospitalization duration of patients with kidney disease, comprising:
[0115] An input module for inputting at least the information of newly admitted patients with kidney disease;
[0116] A prediction module, at least used to predict the hospitalization duration of patients with kidney diseases using the hospitalization duration prediction model constructed and trained by the aforementioned method, and to predict the hospitalization duration of the newly admitted patient;
[0117] The display module is at least used to display the visual prediction results.
[0118] Compared with the prior art, the patient hospitalization duration prediction method of the embodiment of the present application can achieve the following beneficial effects: based on the cascaded layer-by-layer modeling algorithm for ordered multi-classification prediction, the sequential progressive relationship between each category in the ordered multi-classification outcome variable is retained, and the ordered categories are not assumed to be proportional, which is more in line with the characteristics of real data; by splitting the data set layer by layer, the data of the two categories in the data set used for training the base learner of each layer are relatively balanced, which can effectively solve the problem of data imbalance between multiple categories. At the same time, the present disclosure mines the patient data collected by the hospital electronic case data management system based on the cascaded layer-by-layer modeling algorithm, and uses the gradient boosting decision tree algorithm as the base learner to construct a patient-oriented hospitalization duration prediction model and system, providing a visual display of prediction results for newly admitted patients, and realizing the synchronization update of the intelligent hospitalization duration prediction model according to the data update of the hospital electronic medical record data management system, improving the shortcomings of the existing hospitalization duration prediction based on the subjective prediction of the experience of clinicians, and effectively improving the prediction efficiency and accuracy of the patient's hospitalization duration, thereby assisting clinical decision-making and medical resource allocation, and improving the patient's hospitalization prognosis and medical satisfaction.
[0119] The method, device, electronic device, and computer-readable storage medium provided in the embodiments of the present application are not limited to being used for predicting the length of hospital stay of patients with kidney disease, but can also be widely used for predicting the length of hospital stay of patients with other diseases.
[0120] It should be noted that:
[0121] The term "module" is not intended to be limited to a specific physical form. Depending on the specific application, a module can be implemented as hardware, firmware, software, and / or a combination thereof. In addition, different modules can share common components or even be implemented by the same components. There may or may not be clear boundaries between different modules.
[0122] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the application described herein, and the description of the specific language above is for the purpose of disclosing the best mode of the application.
[0123] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0124] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0125] The above-mentioned embodiments only express the implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for predicting the length of hospital stay of a patient, characterized in that: include: Use multiple binary classification base learners to cascade and construct an ordered multi-classification prediction model; Using the training data set to train each of the base learners until each of the base learners meets the performance index requirement, thereby obtaining a trained prediction model; According to the preset prediction features, select the sample to be predicted and input it into the trained prediction model to obtain the prediction result; Before using the training data set to train each of the base learners, the prediction method further includes: Based on the electronic medical record data of patients in the hospital information management system, data cleaning is performed and training data is extracted to form a training data set; Before selecting a sample to be predicted and inputting it into the trained prediction model according to the preset prediction features, the prediction method further includes: Screening out prediction features with high prediction value for the length of hospital stay of the patient from the electronic medical record data of the hospital information management system or from the training data set; Combine expert knowledge to supplement and adjust the selected prediction features to obtain preset prediction features; The step of training each of the binary classification base learners using the training data set until each of the binary classification base learners meets the performance indicator requirement includes: S1. Input the training data set into the prediction model, set the initial value m=1; the input format of a single training sample is (x, y); y is an outcome variable containing ordered M categories, x represents a set of prediction features of the training sample; M is the number of classification categories of the prediction model; S2, determine whether m < M; if so, proceed to step S3; if not, jump to step S7; S3, extracting the data of y≥mth category as the training data subset of the mth base learner; S4, labeling the data of y=mth category in the training data subset with a first training label, and labeling the data of y>mth category in the training data subset with a second training label; S5. Based on the training data subset and training labels obtained in the above steps, train the binary classification base learner to obtain the mth base learner; S6, m is incremented by 1 and updated, and the process returns to step S2; S7. Output the trained M-1 base learners.
2. The method according to claim 1, characterized in that Before using the training data set to train each of the base learners, the prediction method further includes: Based on the electronic medical record data of patients in the hospital information management system, data cleaning is performed and training data is extracted to form a training data set.
3. The method according to claim 2, characterized in that The data cleaning comprises: Patient data with too high missing rates were removed, abnormal data were removed, and missing values were randomly filled.
4. The method according to claim 1, characterized in that The binary classification base learner is a gradient boosting decision tree algorithm.
5. The method according to claim 1, characterized in that Random hyperparameter search combined with five-fold cross validation method is used to optimize the hyperparameters of each base learner, and the F1 score is used as a reference indicator for the model prediction performance of hyperparameter optimization.
6. The method according to claim 1, characterized in that The prediction method further comprises: Based on the update of electronic medical record data in the hospital information management system, the prediction model is updated synchronously and regularly.
7. A device for predicting the length of hospital stay of a patient, characterized in that: include: A construction module is used to construct an ordered multi-classification prediction model by cascading multiple binary classification base learners; A training module, used for training each base learner using a training data set until each base learner meets the performance index requirement, thereby obtaining a trained prediction model; A prediction module is used to select samples to be predicted according to preset prediction features and input them into the trained prediction model to obtain prediction results; A data extraction module is used to perform data cleaning based on the electronic medical record data of patients in the hospital information management system before using the training data set to train each base learner, and extract training data to form a training data set; A prediction feature acquisition module is used to select prediction features with high prediction value for the length of hospital stay of the patient from the electronic medical record data of the hospital information management system or from the training data set before selecting the samples to be predicted and inputting them into the trained prediction model according to the preset prediction features; and to supplement and adjust the selected prediction features in combination with expert knowledge to obtain the preset prediction features; The training module is also used to: S11, input the training data set into the prediction model, set the initial value m=1; the input format of a single training sample is (x, y); y is an outcome variable containing ordered M classifications, x represents a set of prediction features of the training sample; M is the number of classification categories of the prediction model; S12, determine whether m < M; if so, proceed to step S13; if not, jump to step S17; S13, extracting data of y≥mth category as the training data subset of the mth base learner; S14, labeling the data of y=mth category in the training data subset with a first training label, and labeling the data of y>mth category in the training data subset with a second training label; S15, based on the training data subset and training labels obtained in the above steps, training the binary classification base learner to obtain the mth base learner; S16, m is incremented by 1 and updated, and the process returns to step S12; S17. Output the trained M-1 base learners.
8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for predicting the length of hospital stay of a patient as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement a method for predicting a patient's hospital stay as described in any one of claims 1-6.
Citation Information
Patent Citations
Big data analysis-based disease cloud picture establishing method
CN106202883A
Medical data processing method, device and equipment
CN107103198A
Cascade classifier-based official website recognition method
CN107403198A
Deep learning-based medical record model building method, system and device
CN108231146A
Sepsis early prediction method based on machine learning
CN111261282A
