Elderly health risk prediction system and method
By performing data cleaning, feature engineering and data balance in the health risk prediction system of the elderly, combining multiple machine learning algorithms and SHAP value interpretation, the problems of data imbalance and prediction results interpretation in traditional systems are solved, and the model performance and System availability.
Patent Information
- Application Number
- CN202411073584.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-12
AI Technical Summary
The traditional elderly health risk prediction system lacks a complete data processing process, which leads to low quality of data input by the model, ignores data imbalance problem, resulting in poor performance of the model when predicting a few samples, and lacks the function of interpreting the prediction results and Flexible deployment method.
Provides a health risk prediction system for the elderly, including data collection preprocessing module, feature engineering module, data balance module, model training module, model evaluation module, model interpretation module, system deployment module and monitoring and maintenance module, through data cleaning, feature selection and processing , undersampling and oversampling, training of multiple machine learning algorithms, interpretation of SHAP value, and development of API interfaces and user interfaces to handle data imbalance and improve model performance.
It improves the generalization ability of the model on unbalanced data sets, provides clear explanation and flexible deployment of predicted results, enhances the usability and applicability of the system, and ensures the timeliness and accuracy of the data.
Smart Images

Figure CN118942704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of health risk prediction, and in particular to a system and method for predicting health risks of the elderly. Background Art
[0002] Elderly care measures, such as medical services, social activities and psychological support, can improve the quality of life of the elderly and make them live healthier and happier in their later years. This is not only beneficial to individuals, but also reduces the burden on families and society. Caring for them reflects the inclusiveness and fairness of society. Preventive health measures and timely medical interventions can reduce the incidence and severity of diseases among the elderly, thereby reducing the overall medical expenditure of society.
[0003] By predicting the disability risks that the elderly may face, medical and nursing institutions can take preventive measures in advance to delay or prevent the occurrence of disability. They can also help develop personalized health management plans and provide customized care services based on the specific needs of each elderly person, thereby improving care effectiveness and the quality of life of the elderly. Accurate risk prediction can help medical and nursing institutions allocate resources more effectively and concentrate limited resources on the elderly groups who need them most, thereby improving service efficiency and effectiveness.
[0004] Therefore, care for the elderly includes many aspects such as regular health checks, psychological support and life guidance, and disability risk prediction is an important part of it. The combination of the two can comprehensively improve the health level of the elderly. Therefore, with the development of science and technology, the health risk prediction system and plan for the elderly has gradually been improved.
[0005] However, in general, traditional solutions lack a complete data processing flow, resulting in low quality of data input to the model, ignoring the problem of data imbalance, and failing to take targeted methods to balance the data, resulting in poor performance of the model when predicting minority samples and prone to bias. Unbalanced data will significantly affect model performance. In the elderly population, the relatively low disability rate leads to an imbalance in the proportion of normal samples and disabled samples. If the disability rate of the elderly is 20%, even if the model predicts that all results are normal, there will still be an accuracy rate of 0.8, which is obviously incorrect. This imbalance also causes the model to tend to predict normal samples more frequently, thereby showing lower accuracy when predicting disabled samples. This single prediction model will further lead to limited prediction capabilities. At the same time, there is a lack of explanation function for the prediction results, and it is impossible to clearly explain the basis and feature contribution of the model prediction. There is a lack of flexible deployment and application methods, and it is impossible to provide an API interface or a friendly user interface, which limits the acquisition and use of prediction results.
[0006] In summary, it is necessary to propose a system and method for predicting the health risks of the elderly to solve the above problems. Summary of the invention
[0007] The purpose of the present invention is to provide a system and method for predicting health risks of the elderly to solve the problems raised in the above background technology.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] Elderly health risk prediction system, including data collection and preprocessing module, feature engineering module, data balancing module, model training module, model evaluation module, model interpretation module, system deployment module and monitoring and maintenance module;
[0010] The data collection and preprocessing module is used to extract the fifth phase of longitudinal research data and data cleaning on high-quality micro data of families and individuals aged 45 and above in China published by the CHARLS project team on November 16, 2023 from the CHARLS project database. The data collection and preprocessing module also includes a data collection unit and a data cleaning unit. The data collection unit is used to collect the fifth phase of data from the CHARLS project database, including micro data of families and individuals and self-reported variables. The data cleaning unit uses Pandas tools to clean the data, fill in missing values or delete abnormal data, and is used to process missing values, abnormal values and duplicate values in the data to ensure the integrity and accuracy of the data;
[0011] The feature engineering module is used for feature selection and feature processing;
[0012] The data balancing module is used to reduce data imbalance through undersampling and oversampling;
[0013] The model training module is used to select logistic regression, K-nearest neighbor, naive Bayes, multi-layer perceptron, random forest and XGBoost for model construction and training;
[0014] The model evaluation module is used for model testing and comparison;
[0015] The model interpretation module is used to use the SHAP value to interpret the prediction results of the model for result analysis;
[0016] The system deployment module is used to develop RESTful API using Flask or Django and provide a friendly user interaction interface;
[0017] The monitoring and maintenance module is used for performance monitoring and model updating.
[0018] Preferably, the feature engineering module further includes a feature selection unit and a feature processing unit;
[0019] The feature selection unit is used to select relevant features based on the self-reported variables;
[0020] The feature processing unit uses StandardScaler and MinMaxScaler tools to process features, which are used to standardize, normalize or classify the selected features in preparation for the machine learning model.
[0021] Preferably, the data balancing module further includes an undersampling unit and an oversampling unit;
[0022] The undersampling unit uses RandomUnderSampler to perform undersampling processing, which is used to undersample the majority class samples to reduce data imbalance;
[0023] The oversampling unit generates new minority class samples using the SMOTE technology, which is used to oversample the minority class samples and increase data balance.
[0024] Preferably, the model training module further includes a model selection unit and a model training unit;
[0025] The model selection unit imports the corresponding machine learning library and initializes the model to select the machine learning algorithm, including logistic regression, K-nearest neighbor, naive Bayes, multi-layer perceptron, random forest and XGBoost;
[0026] The model training unit uses the training data set to perform model training and adjusts hyperparameters to optimize performance, so as to train each model on the balanced data set.
[0027] Preferably, the model evaluation module further comprises a model testing unit and a model comparison unit;
[0028] The model testing unit is used to evaluate the prediction performance of the model on the test set and calculate the accuracy, recall and F1 score indicators;
[0029] The model comparison unit performs model comparison through ROC curve and confusion matrix to compare the performance of different models and select the model with the best performance.
[0030] Preferably, the model interpretation module further includes a SHAP interpretation unit and a result analysis unit;
[0031] The SHAP explanation unit generates an explanation report using the SHAP library, which is used to explain the prediction results of the model through the SHAP value to understand the contribution of each feature to the prediction;
[0032] The result analysis unit performs risk analysis based on the SHAP interpretation results to analyze the disability risk results predicted by the model and identify high-risk individuals.
[0033] Preferably, the system deployment module also includes an API interface unit and a front-end display unit;
[0034] The API interface unit uses Flask or Django to develop a RESTful API so that the system can be called by external applications;
[0035] The front-end display unit is developed using React and Vue front-end frameworks to develop user interfaces and display prediction results and risk analysis reports.
[0036] Preferably, the monitoring and maintenance module further includes a performance monitoring unit and a model updating unit;
[0037] The performance monitoring unit uses Prometheus or Grafana for performance monitoring, which is used to monitor the operating performance of the system in real time and detect potential problems;
[0038] The model updating unit retrains and evaluates the model based on new data, deploys the updated model, and is used to regularly update the model to ensure its accuracy and reliability.
[0039] Based on the above system, the present invention also proposes a method for predicting health risks of the elderly, comprising the following steps:
[0040] S1. Prepare data. Collect the fifth phase data from the CHARLS project database, including household and individual micro data and self-report variables. Handle missing values, outliers and duplicate values in the data to ensure the completeness and accuracy of the data. Divide the data set into a training set and a test set, with a ratio of 80% training set and 20% test set.
[0041] S2. Perform feature engineering to select key features from self-reported variables, including grip strength, mental status, marital status, respiratory function, and age, and standardize, normalize, or classify the selected features to ensure that the features are suitable for use in machine learning models;
[0042] S3. In the data balancing stage, the majority class samples are undersampled to reduce data imbalance, and the minority class samples are oversampled using the SMOTE technique to generate new minority class samples to balance the data set;
[0043] S4. Select logistic regression, K-nearest neighbor, naive Bayes, multilayer perceptron, random forest, and XGBoost for model building and training. Train each model on the balanced dataset and adjust hyperparameters to optimize performance.
[0044] S5. Model evaluation: evaluate the prediction performance of the model on the test set, calculate the accuracy, recall, and F1 score indicators, compare the performance of different models, and select the best performing model;
[0045] S6. Perform model interpretation, use SHAP values to explain the model's prediction results, understand the contribution of each feature to the prediction, analyze the disability risk results predicted by the model, and identify high-risk individuals;
[0046] S7. System deployment and application, using Flask or Django to develop RESTful API so that the system can be called by external applications, developing user interfaces to display prediction results and risk analysis reports;
[0047] S8. Monitor the system's operating performance in real time, detect potential problems, and regularly update the model to ensure its accuracy and reliability.
[0048] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention collects the fifth phase data from the CHARLS project database, uses Pandas to clean the data, fills in missing values or deletes abnormal data, thereby ensuring the timeliness, completeness and accuracy of the data, adopts undersampling and oversampling techniques to deal with the problem of data imbalance, and improves the generalization ability of the model on unbalanced data sets by reducing majority class samples and generating new minority class samples. The present invention also supports training models including logistic regression, K-nearest neighbor, naive Bayes, multilayer perceptron, random forest and XGBoost, trains and evaluates these models on balanced data sets, selects the model with the best performance for prediction, and uses SHAP values to interpret the prediction results of the model, so as to clearly understand the contribution of each feature to the prediction results. At the same time, the present invention also has an API interface and a front-end display function, which can be easily called by external applications, and provides a user-friendly interface to display prediction results and risk analysis reports, thereby improving the availability and applicability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The topology diagram of the elderly health risk prediction system of the present invention is shown;
[0050] Figure 2 The flowchart of the method for predicting health risks of the elderly of the present invention is shown. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] Example 1
[0053] See also Figure 1 ,The present invention proposes a health risk prediction system for the elderly, including a data collection and preprocessing module, a feature engineering module, a data balancing module, a model training module, a model evaluation module, a model interpretation module, a system deployment module and a monitoring and maintenance module;
[0054] Among them, this system collects and cleans data through the data collection and preprocessing module, performs feature selection and feature processing through the feature engineering module, reduces data imbalance through undersampling and oversampling through the data balancing module, selects and trains models through the model training module, tests and compares models through the model evaluation module, performs SHAP interpretation and result analysis through the model interpretation module, provides API interface and front-end display through the system deployment module, and performs performance monitoring and model update through the monitoring and maintenance module.
[0055] It should also be noted that the data collection preprocessing module of the present invention also includes a data collection unit and a data cleaning unit. The data collection unit is used to collect the fifth phase data from the CHARLS project database, including household and individual micro data and self-reported variables. The data cleaning unit uses the Pandas tool to clean the data, fill in missing values or delete abnormal data, and is used to process missing values, abnormal values and duplicate values in the data to ensure the integrity and accuracy of the data.
[0056] It should also be noted that the feature engineering module of the present invention also includes a feature selection unit and a feature processing unit. The feature selection unit is used to select relevant features based on self-reported variables, and the feature processing unit uses StandardScaler and MinMaxScaler tools to process features for standardizing, normalizing or category encoding the selected features in preparation for use in a machine learning model.
[0057] It should also be noted that the data balancing module of the present invention also includes an undersampling unit and an oversampling unit. The undersampling unit uses RandomUnderSampler to perform undersampling processing, which is used to undersample the majority class samples and reduce data imbalance. The oversampling unit uses SMOTE technology to generate new minority class samples, which is used to oversample the minority class samples and increase data balance.
[0058] It should also be noted that the model training module of the present invention also includes a model selection unit and a model training unit. The model selection unit imports the corresponding machine learning library and initializes the model to select a machine learning algorithm, including logistic regression, K-nearest neighbor, naive Bayes, multilayer perceptron, random forest and XGBoost. The model training unit uses the training data set to perform model training and adjusts hyperparameters to optimize performance, and is used to train each model on the balanced data set.
[0059] It should also be noted that the model evaluation module of the present invention also includes a model testing unit and a model comparison unit. The model testing unit is used to evaluate the prediction performance of the model on the test set and calculate the accuracy, recall rate, and F1 score indicators. The model comparison unit performs model comparison through the ROC curve and confusion matrix to compare the performance of different models and select the best performing model.
[0060] It should also be noted that the model interpretation module of the present invention also includes a SHAP interpretation unit and a result analysis unit. The SHAP interpretation unit uses the SHAP library to generate an interpretation report, which is used to explain the prediction results of the model through SHAP values and understand the contribution of each feature to the prediction. The result analysis unit performs risk analysis based on the SHAP interpretation results, which is used to analyze the disability risk results predicted by the model and identify high-risk individuals.
[0061] It should also be noted that the system deployment module of the present invention also includes an API interface unit and a front-end display unit. The API interface unit uses Flask or Django to develop a RESTful API so that the system can be called by external applications. The front-end display unit is developed using the React or Vue front-end framework to develop a user interface and display prediction results and risk analysis reports.
[0062] It should also be noted that the monitoring and maintenance module of the present invention also includes a performance monitoring unit and a model updating unit. The performance monitoring unit uses Prometheus or Grafana for performance monitoring, which is used to monitor the operating performance of the system in real time and detect potential problems. The model updating unit retrains and evaluates the model according to the new data, deploys the updated model, and is used to regularly update the model to ensure its accuracy and reliability.
[0063] Example 2
[0064] See also Figure 2 Based on the above elderly health risk prediction system, a method for predicting elderly health risks, in practical application, specifically includes the following steps:
[0065] Step S1: Extract the fifth phase of longitudinal research data representing high-quality micro data of families and individuals aged 45 and above in China published by the CHARLS project team on November 16, 2023 from the CHARLS project database;
[0066] Use Python's Pandas library to check and remove duplicate records;
[0067] Use the median to fill missing values;
[0068] Identify and handle outliers through the Z-score method;
[0069] Use the train_test_split function in Scikit-learn to divide the data into 80% training set and 20% test set;
[0070] Through step S1, accurate data is used as the basis for the accuracy of the prediction model, thus ensuring the reliability of the analysis results;
[0071] Step S2: select grip strength, mental status, marital status, respiratory function and age as key features;
[0072] Continuous variables such as grip strength and respiratory function were standardized using StandardScaler;
[0073] One-HotEncoder is used to encode categorical variables such as marital status;
[0074] Integrate all processed features to form the final feature matrix, ready for model training;
[0075] Through step S2, using the processed data can improve the model training efficiency and prediction accuracy, and avoid the influence of noise data on the results.
[0076] Step S3: Use the RandomUnderSampler method in the Imbalanced-learn library to reduce the majority class samples;
[0077] Use SMOTE technology to generate new minority class samples, merge the processed minority class and majority class samples to form a new balanced data set;
[0078] Suppose there is a minority class sample x and its k nearest neighbor samples {X:,X:,…,X}. The formula for generating new synthetic samples is shown in formula (1):
[0079] New sample = X + rand (0, 1) x (XX) (1);
[0080] Among them, the range of rand(0,1) is between [0,1], which is used to control the position of the synthetic sample. For multiple minority class samples, repeat the steps of the above formula to generate the corresponding number of synthetic samples to balance the data set;
[0081] The specific operations are as follows:
[0082] Create a SMOTE instance named oversampler and initialize it with SIm0TE(random_state=0);
[0083] random_state=0 is to set the seed of the random number generator to ensure the reproducibility of the results;
[0084] In the fit_resample method, the input features x and target labels y are passed as parameters to the SMOTE instance for processing;
[0085] The fit_resample method performs the following operations to generate some synthetic samples based on the SMOTE algorithm to increase the number of samples in the minority class and make the number of samples between the two classes more balanced;
[0086] Finally, the generated oversampled sample sets are saved in variables osx and osy for subsequent model training or other operations, so that the SMOTE algorithm can be used to process unbalanced data sets and improve the classification performance on minority categories.
[0087] Through step S3, irrelevant features are reduced, computational complexity is reduced, overfitting is avoided, and the generalization ability of the model is improved;
[0088] Step S4: Select the logistic regression, K-nearest neighbor, naive Bayes, multilayer perceptron, random forest and XGBoost models;
[0089] Use Scikit-learn and XGBoost libraries for model training;
[0090] Tune hyperparameters, such as learning rate and tree depth in XGBoost, and optimize them using grid search;
[0091] Use Scikit-learn's cross_validate to perform 5-fold cross validation to ensure model stability;
[0092] Connecting the data input and prediction output through step S4 can accurately reveal hidden patterns and trends in the data;
[0093] Step S5: Calculation method of accuracy, recall and F1 score: Calculate the accuracy, recall and F1 score of each model on the test set, compare the performance indicators of different models, select the best model, and determine the overall optimal model for further explanation and deployment;
[0094] It should also be noted that the calculation method of accuracy is shown in formula (2):
[0095] Accuracy=\frac{TP+TN}{TP+TN+FP+FN} (2);
[0096] It should also be noted that the calculation method of accuracy is shown in formula (3):
[0097] Recall=\frac{TP}{TP+FN} (3);
[0098] It should also be noted that the calculation method of accuracy is shown in formula (4):
[0099] F1=2\times\frac{Precision\times Recall}{Precision+Recall} (4);
[0100] In step S5, there are 50 actual positive and negative samples, and the model prediction results are as follows:
[0101] TP=40;
[0102] TN=45;
[0103] FP=5;
[0104] FN=10;
[0105] Calculate each indicator:
[0106] Accuracy:
[0107] [\text{Accuracy}=\frac{40+45}{40+45+5+10}=\frac{85}{100}=0.85]
[0108] The model’s accuracy is 85%;
[0109] Recall:
[0110] [\text{Recall}=\frac{40}{40+10}=\frac{40}{50}=0.8]The recall rate of the model is 80%;
[0111] Accuracy:
[0112] The accuracy of the model is about 89%.
[0113] F1 score:
[0114] The F1 score of the model is 84%;
[0115] Step S5 ensures the stability and accuracy of the model in practical applications to prevent overfitting or underfitting;
[0116] Step S6: Use the SHAP library to calculate the SHAP value of the feature that affects the prediction result, as shown in formula (5):
[0117] SHAP value=Σ(f(x)-E[f(x)])(v(S∪{i})-v(S)) (5);
[0118] Where f(x) represents the model prediction, E[f(x)] represents the expected value of the model prediction, v(S) represents the SHAP value of the feature subset S, and v(S∪{i}) represents the SHAP value of the new subset after adding feature i;
[0119] Analyze the contribution size and direction of each feature to the prediction results;
[0120] Use the Matplotlib library to draw the SHAP value influence diagram to intuitively show the influence of each feature;
[0121] Continuous monitoring in step S6 can promptly detect and correct performance degradation or other problems to ensure service continuity and reliability;
[0122] Step S7: Use the Flask framework to develop a RESTful API to implement the model call, use React or Angular to develop a front-end user interface to display the prediction results and risk analysis report, and conduct system integration testing and user acceptance testing to ensure that the system functions are complete and runs stably;
[0123] Respond to potential problems in a timely manner through step S7 to prevent the problems from expanding and maintain the overall stability of the system;
[0124] Step S8: Use the Prometheus tool to monitor system performance indicators, such as response time and system load, configure an alert mechanism, and promptly notify the maintenance team when performance falls below the threshold or an error occurs. Regularly evaluate the model effect, collect new data to retrain the model, adjust model parameters, or introduce new algorithms to deal with data drift or performance degradation.
[0125] Step S8 updates and adjusts the model based on new data and feedback to cope with data drift and environmental changes, and continuously improves the adaptability and accuracy of the model.
[0126] In summary, the health risk prediction system of the present invention can effectively evaluate and manage the health status of the elderly through steps S1 to S8, and provide scientific decision support for medical providers and caregivers.
[0127] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. Elderly health risk prediction system, characterized by: It includes data collection and preprocessing module, feature engineering module, data balancing module, model training module, model evaluation module, model interpretation module, system deployment module and monitoring and maintenance module; The data collection and preprocessing module is used to extract the fifth phase of longitudinal research data representing high-quality micro data of families and individuals aged 45 and above in China published by the CHARLS project team on November 16, 2023 from the CHARLS project database and perform data cleaning. The data collection and preprocessing module also includes a data collection unit and a data cleaning unit. The data collection unit is used to collect the fifth phase of data from the CHARLS project database, including micro data of families and individuals and self-reported variables. The data cleaning unit uses Pandas tools to clean the data, fill in missing values or delete abnormal data, and is used to process missing values, abnormal values and duplicate values in the data to ensure the integrity and accuracy of the data; The feature engineering module is used for feature selection and feature processing; The data balancing module is used to reduce data imbalance through undersampling and oversampling; The model training module is used to select logistic regression, K-nearest neighbor, naive Bayes, multi-layer perceptron, random forest and XGBoost for model construction and training; The model evaluation module is used for model testing and comparison; The model interpretation module is used to analyze the prediction results of the model using the SHAP value interpretation model; The system deployment module is used to develop RESTful API using Flask or Django and provide a friendly user interaction interface; The monitoring and maintenance module is used for performance monitoring and model updating.
2. The elderly health risk prediction system according to claim 1, characterized in that: The feature engineering module also includes a feature selection unit and a feature processing unit; The feature selection unit is used to select relevant features based on the self-reported variables; The feature processing unit uses StandardScaler and MinMaxScaler tools to process features, which are used to standardize, normalize or classify the selected features in preparation for the machine learning model.
3. The elderly health risk prediction system according to claim 2, characterized in that: The data balancing module also includes an under-sampling unit and an over-sampling unit; The undersampling unit uses RandomUnderSampler to perform undersampling processing, which is used to undersample the majority class samples to reduce data imbalance; The oversampling unit generates new minority class samples using the SMOTE technology, which is used to oversample the minority class samples and increase data balance.
4. The elderly health risk prediction system according to claim 3 is characterized by: The model training module also includes a model selection unit and a model training unit; The model selection unit imports the corresponding machine learning library and initializes the model to select the machine learning algorithm, including logistic regression, K-nearest neighbor, naive Bayes, multi-layer perceptron, random forest and XGBoost; The model training unit uses the training data set to perform model training and adjusts hyperparameters to optimize performance, so as to train each model on the balanced data set.
5. The elderly health risk prediction system according to claim 4 is characterized by: The model evaluation module also includes a model testing unit and a model comparison unit; The model testing unit is used to evaluate the prediction performance of the model on the test set and calculate the accuracy, recall and F1 score indicators; The model comparison unit performs model comparison through ROC curve and confusion matrix to compare the performance of different models and select the model with the best performance.
6. The elderly health risk prediction system according to claim 5, characterized in that: The model interpretation module also includes a SHAP interpretation unit and a result analysis unit; The SHAP explanation unit generates an explanation report using the SHAP library, which is used to explain the prediction results of the model through the SHAP value to understand the contribution of each feature to the prediction; The result analysis unit performs risk analysis based on the SHAP interpretation results to analyze the disability risk results predicted by the model and identify high-risk individuals.
7. The elderly health risk prediction system according to claim 6, characterized in that: The system deployment module also includes an API interface unit and a front-end display unit; The API interface unit uses Flask or Django to develop a RESTful API so that the system can be called by external applications; The front-end display unit is developed using React and Vue front-end frameworks to develop user interfaces and display prediction results and risk analysis reports.
8. The elderly health risk prediction system according to claim 7, characterized in that: The monitoring and maintenance module also includes a performance monitoring unit and a model updating unit; The performance monitoring unit uses Prometheus or Grafana for performance monitoring, which is used to monitor the operating performance of the system in real time and detect potential problems; The model updating unit retrains and evaluates the model based on new data, deploys the updated model, and is used to regularly update the model to ensure its accuracy and reliability.
9. A method for predicting health risks of the elderly, according to a system for predicting health risks of the elderly according to any one of claims 1 to 8, characterized in that: The following steps are involved: S1. Prepare data. Collect the fifth phase data from the CHARLS project database, including household and individual micro data and self-report variables. Handle missing values, outliers and duplicate values in the data to ensure the completeness and accuracy of the data. Divide the data set into a training set and a test set, with a ratio of 80% training set and 20% test set. S2. Perform feature engineering to select key features from self-reported variables, including grip strength, mental status, marital status, respiratory function, and age, and standardize, normalize, or classify the selected features to ensure that the features are suitable for use in machine learning models; S3. In the data balancing stage, the majority class samples are undersampled to reduce data imbalance, and the minority class samples are oversampled using the SMOTE technique to generate new minority class samples to balance the data set; S4. Select logistic regression, K-nearest neighbor, naive Bayes, multilayer perceptron, random forest, and XGBoost for model building and training. Train each model on the balanced dataset and adjust hyperparameters to optimize performance. S5. Model evaluation: evaluate the prediction performance of the model on the test set, calculate the accuracy, recall, and F1 score indicators, compare the performance of different models, and select the best performing model; S6. Perform model interpretation, use SHAP values to explain the model's prediction results, understand the contribution of each feature to the prediction, analyze the disability risk results predicted by the model, and identify high-risk individuals; S7. System deployment and application: Use Flask or Django to develop RESTful API so that the system can be called by external applications, develop user interfaces, and display prediction results and risk analysis reports; S8. Monitor the system's operating performance in real time, detect potential problems, and regularly update the model to ensure its accuracy and reliability.
Citation Information
Patent Citations
Disease risk prediction method and system based on put-back undersampling integration framework
CN116453694A
Health risk screening system
CN116864121A
