Method and system for predicting HIV infection risk of MSM population
By building a stacked machine learning model based on HIV infection risk prediction system for MSM population, combined with base regressor and meta-model, the HIV infection risk prediction for MSM population is optimized, solving the problem of data source and model singularity in the existing technology, and improving the The accuracy and efficiency of predictions are achieved.
Patent Information
- Application Number
- CN202411113866.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the HIV infection risk prediction methods and systems in the MSM population rely on a single data source and model, and cannot effectively overcome the limitations of a single model, and fail to optimize in combination with the regional AIDS epidemic level, resulting in poor accuracy of the prediction results.
By obtaining data on the basic demographic characteristics, sexual behavior characteristics and previous disease history of the MSM population, preliminary classification is carried out according to the regional HIV prevalence level, stacked machine learning models are constructed, combined with basic regressors and meta-models for prediction, and using SMOTE and crossover Verify the performance of the optimization model, and finally use the confusion matrix and ROC curve for performance evaluation, and select the optimal model for risk prediction.
Accurate prediction of HIV infection risk in MSM populations in different prevalence levels has been achieved, simple and efficient risk assessment results are provided, and individuals are guided to take appropriate preventive measures or further inspections.
Smart Images

Figure CN119132641A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of AIDS transmission prevention, and specifically relates to a method and system for predicting HIV infection risk among MSM population. Background Art
[0002] Men who have sex with men, also known as men who have sex with men, or MSM for short, have the highest HIV infection rate among all groups of people. Therefore, it is of great significance to develop a prediction model for the HIV infection risk of the MSM population.
[0003] In the current existing technologies, the HIV infection risk prediction methods and systems developed for MSM populations mostly obtain relevant information through questionnaire surveys before making the next prediction, and the data source is relatively single; in addition, the models used in the current HIV infection risk prediction methods and systems for MSM populations are relatively single and cannot overcome the limitations of a single model; secondly, in view of the different levels of AIDS epidemics in various regions, the existing technologies mostly use the same model for prediction without combining regional optimization, and the accuracy of the prediction results is poor.
[0004] Therefore, it is of great significance to develop a new method and system for predicting HIV infection risk in MSM population. Summary of the invention
[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide an HIV infection risk prediction system based on MSM monitoring data in view of the deficiencies of the prior art. The basic demographic characteristics, sexual behavior characteristics, previous medical history and other related data of HIV-positive and HIV-negative individuals in the MSM population are obtained through sentinel monitoring data; then, the MSM individuals are preliminarily classified according to the HIV prevalence level in the area where they are located; then, feature selection is performed on the MSM groups in areas with different prevalence levels to determine the classification variables with the most predictive value; these feature variables are input into a pre-trained stacked machine learning model to construct an HIV infection risk prediction model for areas with different prevalence levels; the performance of the infection risk prediction model is evaluated using a confusion matrix and a ROC curve; finally, the HIV infection risk of MSM individuals in areas with different prevalence levels is predicted using the risk prediction model with the best performance evaluation.
[0006] In order to solve the above technical problems, the present invention discloses a method for predicting HIV infection risk in MSM population, the steps of the method are:
[0007] S1. Data acquisition: basic demographic characteristics, sexual behavior characteristics, past medical history and intervention service characteristics are obtained based on monitoring data;
[0008] S2. Regional classification: preliminary classification based on the HIV prevalence level of the MSM population in the monitored area;
[0009] S3. Data processing: preprocess the feature data obtained in S1 and perform feature screening based on the regional classification in S2;
[0010] S4. Construct an infection risk prediction model based on stacked learning: wherein the infection risk prediction model includes two layers, the first layer is a base regressor obtained by combining basic models for training, and the second layer is a meta-model; the data processed in S3 is input into the first layer base regressor to obtain the corresponding prediction output, and then the prediction output and the original label are used as the target variable to construct a new training data set to train the meta-model;
[0011] S5. Use SMOTE combined fold cross validation method to optimize the performance of the prediction model;
[0012] S6. Test and evaluate the optimized models in S5, and select the best model for prediction in different epidemic levels;
[0013] S7. Use the model optimized in S6 to predict risks.
[0014] The basic demographic characteristics include age, marital status with the opposite sex, registered permanent residence, ethnicity, length of time living in the local area, educational level, self-perceived sexual orientation, and the main places and methods of finding male sexual partners;
[0015] The sexual behavior characteristics include anal sex with the same sex and condom use in the past 6 months, the number of anal sex with the same sex in the past week, sexual sex with the same sex and condom use in the past 6 months, and sexual sex with the opposite sex and condom use in the past 6 months;
[0016] The past medical history described included: gonorrhea, syphilis, genital Chlamydia trachomatis infection, genital warts, genital herpes, and HCV;
[0017] The intervention service characteristics include knowledge of AIDS-related knowledge, drug use status, HIV testing status in the past year, whether the recipients have received intervention services for condom promotion and distribution and AIDS consultation and testing, whether the recipients have received intervention services for community drug maintenance treatment and clean needle provision or exchange, and whether the recipients have received intervention services for peer education.
[0018] Among them, in S4, the basic models are logistic regression, random forest, extreme gradient boosting algorithm, lightweight gradient boosting algorithm and category gradient boosting algorithm.
[0019] Among them, in S4, the base regressor is obtained by combining 5 basic models. The specific combination method is: combining any two basic models, any three basic models, any four basic models and five basic models to obtain 26 base regressors, and then using the 5 basic models to predict the data set respectively to obtain new feature variables, and then combining the new feature variables and performing weighted averaging to generate new prediction variables to train the 26 base regressors.
[0020] Among them, in S4, the meta-model is a random forest.
[0021] The present invention also provides a MSM population HIV infection risk prediction system, comprising:
[0022] A data storage module is used to store basic demographic characteristics, sexual behavior characteristics, past medical history, and intervention service characteristics of HIV-positive and HIV-negative individuals in the MSM population obtained through monitoring data;
[0023] The regional classification module is used to preliminarily classify the MSM population into three categories of high, medium and low HIV epidemic areas according to the monitored areas;
[0024] The variable transformation module is used to transform and merge some characteristic variables in the MSM monitoring data into dummy variables;
[0025] Feature selection module, used to select features of MSM with different HIV prevalence levels and screen and determine feature variables;
[0026] The model training module is used to input the component variables screened out after feature selection into the pre-established model for training, so as to obtain the HIV infection risk prediction model for MSM population in areas with different epidemic levels;
[0027] Unbalanced data processing module to optimize the performance of prediction models;
[0028] A testing module, used to test the infection risk prediction model after unbalanced data processing using test data;
[0029] The performance evaluation module is used to evaluate the performance based on the test results and select the HIV infection risk prediction model with the best prediction effect in different epidemic levels;
[0030] The risk prediction module is used to predict infection risk using the HIV infection risk prediction model.
[0031] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for predicting HIV infection risk among MSM populations of the present invention.
[0032] The present invention also provides a computer device, 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 for predicting HIV infection risk in MSM population of the present invention when executing the program.
[0033] Beneficial effects: The advantage of the prediction method and system developed by the present invention is that it can effectively predict the risk of HIV infection by collecting easily accessible population characteristic information. The method is simple to operate and highly efficient, and can provide timely risk assessment results for the tested population, guiding them to take appropriate preventive measures or further examinations. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0035] Figure 1 This is a flow chart of the method for predicting HIV infection risk in MSM population of the present invention;
[0036] Figure 2 Schematic diagram of a basic model, a base regressor, and a meta-model of a stacked model in an embodiment of the present invention;
[0037] Figure 3 This is a prediction flow chart in Example 1 of the present invention. DETAILED DESCRIPTION
[0038] In order to better understand the technical solution of the present invention, the present invention will be further described in detail below in conjunction with specific embodiments. The embodiments described below are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0039] Example 1: Method for predicting HIV infection risk in MSM population
[0040] This example obtains sentinel surveillance data of MSM in Guizhou, Guangdong and Shandong provinces in China. The surveillance data refers to the HIV infection status, behavioral characteristics and related information of a specific population collected continuously at a fixed location and fixed time. The subjects of the MSM sentinel surveillance data are recruited by non-governmental organizations and local Centers for Disease Control and Prevention using snowball sampling at MSM activity venues, VCT clinics or the Internet. The main contents of the questionnaire include basic demographic characteristics, AIDS-related knowledge, sexual behavior characteristics, prevention services, past medical history, and serological examinations are performed on the subjects;
[0041] Among them, basic demographic characteristics include: age, marital status with the opposite sex, registered residence, ethnicity, length of time living in the local area (months), education level, self-perceived sexual orientation, and the main place / method for finding male sexual partners;
[0042] Sexual behavior characteristics included: anal sex with the same sex in the past 6 months and condom use, number of anal sex with the same sex in the past week (times), sexual behavior with the same sex in the past 6 months and condom use, sexual behavior with the opposite sex in the past 6 months and condom use;
[0043] Past medical history included: gonorrhea, syphilis, genital Chlamydia trachomatis infection, genital warts, genital herpes, HCV;
[0044] The characteristics of the intervention services include: knowledge of AIDS-related knowledge, drug use status, HIV testing status in the past year, experience with condom promotion and distribution / AIDS counseling and testing intervention services, experience with community drug maintenance treatment / clean needle provision / exchange intervention services, and experience with peer education intervention services.
[0045] Subsequently, MSM individuals were preliminarily classified according to the HIV prevalence level in their area. MSM population in Guizhou Province was classified as HIV high prevalence area, MSM population in Guangdong Province was classified as HIV medium prevalence area, and MSM population in Shandong Province was classified as HIV low prevalence area. Then, IBM SPSS statistics 24.0 was used to transform and merge the basic demographic characteristics and sexual behavior characteristics variables in the MSM monitoring data into dummy variables. Subsequently, feature selection was performed on MSM groups in different prevalence levels to determine the most predictive classification variables. The feature selection steps were as follows: First, indicators that had no direct relationship with the outcome variables were manually deleted according to the actual importance of the indicators, and then univariate logistic regression analysis was performed with the corresponding outcome variables one by one. P value < 0.05 was considered statistically significant, and indicators that met this standard were included in the prediction model.
[0046] These characteristic variables are input into the pre-trained stacked machine learning model to construct HIV infection risk prediction models for areas with different epidemic levels. In this embodiment, the basic model of the stacked machine learning model selects 5 basic models, including logistic regression (LR), random forest (RF), extreme gradient boosting algorithm (XGBoost), light gradient boosting algorithm (Light GBM) and category gradient boosting algorithm (CatBoost), and the 5 basic models are combined, such as Figure 2 The figure shows the combination of 5 basic models. After the combination, 26 base regressors are obtained. The specific combination method is as follows: first, the 5 basic models predict the data set respectively, output probability values, representing the possibility of HIV positivity, and generate new feature variables. According to the combination method of the basic models in the base regressor, the newly generated feature variables are combined and weighted averaged to generate new prediction variables; then, each base regressor is trained by 5-fold cross validation. For each round of cross validation, the prediction output of the base regressor on the validation set is retained, and a total of 26 base regressor prediction outputs are obtained. These prediction outputs will be used as input features of the second-layer model;
[0047] Use the prediction results of the 26 base regressors on the validation set as new features and the original labels as target variables to construct a new training dataset, and select the random forest model as the meta-model. Use the newly constructed dataset to train the meta-model, and the meta-model will learn how to combine the prediction results of each base model to make the final prediction.
[0048] The performance of the prediction model is optimized by using the SMOTE (Synthetic Minority Over-sampling Technique) combined with the 10-fold cross validation (10-fold cross validation, 10-fold CV) method. For each minority class sample, SMOTE randomly selects its 100 neighboring samples (these neighboring samples are usually the 100 nearest neighbors found in the feature space). Then, a new sample is generated between this minority class sample and one of its neighboring samples according to a certain ratio. This process is repeated many times to generate multiple new synthetic samples until the records of the minority class and the majority class are equal.
[0049] The 10-fold cross validation is to randomly divide the dataset into 10 parts (folds), use 9 parts as training sets to build the prediction model, and the remaining 1 part as a test set to evaluate the model performance.
[0050] The key to SMOTE combined with 10-fold cross validation is that the SMOTE technique is applied to a training set consisting of 9 parts instead of the entire data set. The above process is then repeated 10 times so that each of the 10 parts can be used as a test set. The final indicator for measuring model performance is the average of the corresponding performance indicators after all 10 parts have been tested.
[0051] The ROC curve was used to evaluate the performance of 26 infection risk prediction models in three different epidemic areas of high, medium and low. The area under the curve (AUC) was used to evaluate the classification ability of the prediction model. Table 1 shows the AUC values of 26 stacked models in high, medium and low epidemic areas. The risk prediction model with the best performance evaluation was used to predict HIV infection risks for MSM individuals in areas with different epidemic levels. The best infection risk prediction model in high epidemic areas was the combination of LR+RF+CatBoost, the best infection risk prediction model in medium epidemic areas was the combination of LR+RF+XGBoost+CatBoost, and the best infection risk prediction model in low epidemic areas was the combination of RF+CatBoost.
[0052] Table 1 AUC values of 26 stacking models in high, medium and low epidemic areas
[0053]
[0054]
[0055] Finally, the HIV infection risk prediction model is used to predict the infection risk.
[0056] Example 2: HIV infection risk prediction system for MSM population
[0057] This embodiment provides a system for predicting HIV infection risk among MSM population, which specifically includes:
[0058] A data storage module is used to store the basic demographic characteristics, sexual behavior characteristics, previous medical history and other related data of HIV-positive and HIV-negative individuals in the MSM population obtained through sentinel surveillance data;
[0059] The regional classification module is used to preliminarily classify the MSM population into three categories of high, medium and low HIV epidemic areas according to the monitored areas;
[0060] The variable transformation module is used to transform and merge some characteristic variables in the MSM monitoring data using IBM SPSS statistics 24.0;
[0061] Feature selection module, used to select features of MSM with different HIV prevalence levels and screen and determine feature variables;
[0062] The model training module is used to input the component variables screened out after feature selection into a pre-established stacked machine learning model for training, so as to obtain a prediction model for HIV infection risk among MSM populations in areas with different epidemic levels;
[0063] Unbalanced data processing module, used to optimize the performance of the prediction model using SMOTE (Synthetic Minority Over-sampling Technique) combined with 10-fold cross validation (10-fold CV) method;
[0064] A testing module, used to test the infection risk prediction model after unbalanced data processing using test data;
[0065] The performance evaluation module is used to evaluate the performance of the infection risk prediction model using the confusion matrix ROC curve according to the test results, and select the HIV infection risk prediction model with the best prediction effect in different epidemic levels;
[0066] The risk prediction module is used to predict infection risk using the HIV infection risk prediction model.
[0067] Embodiment 3: Computer readable storage medium
[0068] The computer-readable storage medium of this embodiment stores a computer program, which, when executed by a processor, implements the steps in the method for predicting HIV infection risk among MSM populations of Example 1.
[0069] The computer-readable storage medium of this embodiment may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal; the computer-readable storage medium of this embodiment may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the terminal; further, the computer-readable storage medium may also include both an internal storage unit of the terminal and an external storage device.
[0070] The computer-readable storage medium of this embodiment is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0071] Example 4: Computer equipment
[0072] The computer device of this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for predicting HIV infection risk among MSM populations of Example 1 are implemented.
[0073] In this embodiment, the processor may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, readily available programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0074] Those skilled in the art will appreciate that the disclosed content of the embodiments may be provided as methods, systems, or computer program products. Therefore, the present solution may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, the present solution may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
[0075] The present solution is described with reference to the flowchart and / or block diagram of the method and computer program product according to the embodiment of the present solution. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions; these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0076] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0078] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0079] The present invention provides a method and system for predicting HIV infection risk in MSM population. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. A method for predicting HIV infection risk in MSM population, characterized in that: The steps of the method are: S1. Data acquisition: basic demographic characteristics, sexual behavior characteristics, past medical history and intervention service characteristics are obtained based on monitoring data; S2. Regional classification: preliminary classification based on the HIV prevalence level of the MSM population in the monitored area; S3. Data processing: preprocess the feature data obtained in S1 and perform feature screening based on the regional classification in S2; S4. Construct an infection risk prediction model based on stacked learning: wherein the infection risk prediction model includes two layers, the first layer is a base regressor obtained by combining basic models for training, and the second layer is a meta-model; the data processed in S3 is input into the first layer base regressor to obtain the corresponding prediction output, and then the prediction output and the original label are used as the target variable to construct a new training data set to train the meta-model; S5. Use SMOTE combined fold cross validation method to optimize the performance of the prediction model; S6. Test and evaluate the optimized models in S5, and select the best model for prediction in different epidemic levels; S7. Use the model optimized in S6 to predict risks.
2. The prediction method according to claim 1, characterized in that: The basic demographic characteristics include age, marital status with the opposite sex, registered permanent residence, ethnicity, length of time living in the local area, educational level, self-perceived sexual orientation, and the main places and methods of finding male sexual partners; The sexual behavior characteristics include anal sex with the same sex and condom use in the past 6 months, the number of anal sex with the same sex in the past week, sexual sex with the same sex and condom use in the past 6 months, and sexual sex with the opposite sex and condom use in the past 6 months; The past medical history described included: gonorrhea, syphilis, genital Chlamydia trachomatis infection, genital warts, genital herpes, and HCV; The intervention service characteristics include knowledge of AIDS-related knowledge, drug use status, HIV testing status in the past year, whether the recipients have received intervention services for condom promotion and distribution and AIDS consultation and testing, whether the recipients have received intervention services for community drug maintenance treatment and clean needle provision or exchange, and whether the recipients have received intervention services for peer education.
3. The prediction method according to claim 1, characterized in that: In S4, the basic models are logistic regression, random forest, extreme gradient boosting algorithm, lightweight gradient boosting algorithm and categorical gradient boosting algorithm.
4. The prediction method according to claim 1, characterized in that: In S4, the base regressor is obtained by combining 5 basic models. The specific combination method is: combining any two basic models, any three basic models, any four basic models and five basic models to obtain 26 base regressors, and then using the 5 basic models to predict the data set respectively to obtain new feature variables, and then combining the new feature variables and performing weighted averaging to generate new prediction variables to train the 26 base regressors.
5. The prediction method according to claim 1, characterized in that: In S4, the meta-model is a random forest.
6. A system for predicting HIV infection risk among MSM population, characterized in that: include: A data storage module is used to store basic demographic characteristics, sexual behavior characteristics, past medical history, and intervention service characteristics of HIV-positive and HIV-negative individuals in the MSM population obtained through monitoring data; The regional classification module is used to preliminarily classify the MSM population into three categories of high, medium and low HIV epidemic areas according to the monitored areas; The variable transformation module is used to transform and merge some characteristic variables in the MSM monitoring data into dummy variables; Feature selection module, used to select features of MSM with different HIV prevalence levels and screen and determine feature variables; The model training module is used to input the component variables screened out after feature selection into the pre-established model for training, so as to obtain the HIV infection risk prediction model for MSM population in areas with different epidemic levels; Unbalanced data processing module to optimize the performance of prediction models; A testing module is used to test the infection risk prediction model after unbalanced data processing using test data; The performance evaluation module is used to evaluate the performance based on the test results and select the HIV infection risk prediction model with the best prediction effect in different epidemic levels; The risk prediction module is used to predict infection risk using the HIV infection risk prediction model.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for predicting HIV infection risk among MSM population according to any one of claims 1 to 5 are implemented.
8. A computer 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 program, the steps in the method for predicting HIV infection risk among MSM population according to any one of claims 1 to 5 are implemented.
