Cervical intraepithelial neoplasia risk prediction model and construction method thereof, electronic equipment and storage medium

Through the feature-level integrated learning method of integrated decision trees and artificial neural networks, combined with correlation analysis and SHAP algorithm, the overfitting problem of existing models in complex data situations is solved, and the accuracy and generalization ability of cervical intraepithelial neoplasia risk prediction is improved.

CN119650049APending Publication Date: 2025-03-18HEBEI UNIV OF ENG

Patent Information

Application Number
CN202510186339.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing disease prediction models are prone to overfitting when data distribution is complex or noise is present, and a single algorithm is difficult to perform well on new data sets, resulting in inaccurate prediction of risk of cervical intraepithelial neoplasia.

Method used

The integrated learning method is adopted, combining decision trees and artificial neural networks to integrate at the feature level. Through Spearman correlation analysis, XGBoost model and SHAP algorithm, the nonlinear relationship between feature variables and outcome variables is mined, and the feature weights are dynamically adjusted to improve the generalization ability of the model.

Benefits of technology

It improves the accuracy and reliability of the risk prediction model of cervical intraepithelial neoplasia, enhances the ability to identify key features, reduces the risk of overfitting, and improves the transparency and interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119650049A_ABST
    Figure CN119650049A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of deep learning, and discloses a cervical intraepithelial neoplasia risk prediction model and a construction method thereof, electronic equipment and a storage medium. A data analysis step: screening out original significant features; constructing a decision tree model by taking the original significant features as input data to obtain a prediction result of each sample; extracting a prediction result as a new significant feature; and combining the original significant features and the new significant features into an extended feature set, and training an artificial neural network model by using the extended feature set to obtain a cervical intraepithelial neoplasia risk prediction model. According to the method, the decision tree and the artificial neural network are integrated, and clinical screening indexes are combined, so that the cervical intraepithelial neoplasia risk assessment is realized, the prediction accuracy and robustness are improved, and the clinical diagnosis efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and in particular relates to a cervical intraepithelial neoplasia risk prediction model and a construction method thereof, an electronic device and a storage medium. Background Art

[0002] Cervical intraepithelial neoplasia (CIN) is the early lesion stage of cervical cancer, which reflects the continuous process of cervical cancer. CIN is divided into three levels: CIN1, CIN2, and CIN3. Among them, most CIN1 can regress naturally, but some CIN2 and CIN3 have the potential to become cancerous. Early screening and timely treatment of CIN are the key to reducing morbidity and mortality. Pathological tissue biopsy is the gold standard for clinical diagnosis of cervical cancer with high accuracy, but it is not suitable for large-scale screening because it requires the removal of cervical tissue cells, which has the risk of causing secondary infection damage, is more invasive, expensive, and requires a high level of diagnosis. Now this process can be optimized through more advanced technical means. Therefore, it is necessary to develop a cervical cancer auxiliary diagnosis model based on early screening methods to predict the risk level of CIN in patients before pathological tissue biopsy, with the aim of timely detecting and treating people at high risk of developing cervical cancer.

[0003] Traditional disease prediction models are built based on a single machine learning algorithm, which may not generalize well to unseen data, especially when the data distribution is complex or noisy. It is easy to overfit the training data, especially when the model complexity is high, which will cause the model to perform poorly on new data sets. Ensemble learning methods overcome the above defects by combining the predictions of multiple single algorithms, and usually provide better generalization ability, robustness and prediction performance. Summary of the invention

[0004] An object of embodiments of the present invention is to solve at least the above problems and / or disadvantages and to provide at least the advantages to be described below.

[0005] Another object of the present invention is to provide a method for constructing a cervical intraepithelial neoplasia risk prediction model, a cervical intraepithelial neoplasia risk prediction model, an electronic device and a storage medium.

[0006] To this end, the technical solution provided by the present invention is: In a first aspect, a method for constructing a cervical intraepithelial neoplasia risk prediction model comprises the following steps: Data sample collection steps: collecting characteristic variables, the characteristic variables include continuous variables and categorical variables, the continuous variable is the age of the patient at the time of clinical examination, the categorical variables include the results of liquid-based thin layer cytology examination; human papillomavirus results; and folate receptor-mediated cervical special staining results; and collecting outcome variables, the outcome variables are divided according to the pathological results, including CIN2 and below, CIN2 and above; Data analysis steps: Spearman correlation analysis was used to analyze all feature variables to determine the degree of correlation between each feature variable; with feature variables as input and outcome variables as output, XGBoost was used to build a model to explore the nonlinear relationship between feature variables and outcome variables, and the SHAP algorithm was used to assign importance scores to the outcome variables for each feature variable in the nonlinear relationship; based on the outcome variables, two risk categories were divided: CIN level 2 and below and CIN level 2 and above, and whether the continuous variable age satisfied normal distribution and homogeneity of variance at the same time was checked. If both were satisfied, the t-test was used to check the differences in the mean age of data samples at each risk level; if not, the Mann–Whitney U test was used to check the differences in the median age of data samples at each risk level; a two-tailed p value < 0.05 was used as the criterion for statistical significance, and a significance analysis was performed on the degree of correlation, importance score, and difference to screen out the original significant features; The original significant features are used as input data to build a decision tree model, and the data samples are divided into a training set and a test set. The decision tree model is trained using the training set. After the training is completed, the trained decision tree model is applied to the training set and the test set to obtain the prediction results of each sample; the prediction results are extracted as new significant features; The original significant features and the new significant features were merged into an extended feature set, and the artificial neural network model was trained using the extended feature set to obtain the cervical intraepithelial neoplasia risk prediction model.

[0007] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, an attention layer is provided between two hidden layers of the artificial neural network model, which dynamically adjusts the weights of different features according to the correlation between the features in the input extended feature set and the prediction target of the model, and the weight value range is (0,1], and the sum of all weight values ​​is 1.

[0008] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, the artificial neural network model is provided with an output layer, and the output layer uses a sigmoid activation function for binary classification. The formula for the sigmoid activation function is: Where is the output value of the sigmoid function when the input is x, x is the input value of the sigmoid function, and e is the base of the natural logarithm; The artificial neural network model was compiled using the Adam optimizer (learning rate set to 0.001) and the binary cross entropy loss function; and an early stopping strategy was introduced. When the loss on the validation set did not improve for 5 consecutive cycles, the training process of the artificial neural network model would automatically stop and restore the model to the optimal weight state.

[0009] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, when constructing the decision tree model, a grid search algorithm and a 5-fold cross validation are used to obtain the optimal parameters of the model, wherein, in the decision tree generation, a DecisionTreeClassifier class is created based on the CART algorithm in scikit-learn, and Gini impurity or mean square error is used for the regression tree as the splitting criterion, and the parameter criterion='gini' is set, Starting from the root node, the algorithm calculates all possible split points and selects the best split point based on the Gini impurity. According to the splitter='random' parameter, the algorithm randomly selects a subset of the original significant features to calculate at each split. In the CART algorithm, min_samples_split=5 is set. Set max_features='sqrt'.

[0010] Preferably, the method for constructing a cervical intraepithelial neoplasia risk prediction model further comprises: Data collection steps: The following clinical indicators were collected from women aged 18-100 years: liquid-based thin-layer cytology results, human papillomavirus test results, folate receptor-mediated cervical special staining results, and cervical pathological biopsy results; Data preprocessing steps: First, extract feature variables from the collected data, then fill in missing values, and then use random stratified sampling to divide the data set into training set and test set. For unbalanced data sets, use synthetic minority oversampling technology SMOTE to oversample positive samples in the training set, including: Calculate k nearest neighbors: For each sample a in the minority class, use the Euclidean distance as the standard to calculate its distance to all samples in the minority class sample set to obtain its k nearest neighbors, where k is a hyperparameter indicating the number of nearest neighbor samples selected; Select neighbors and synthesize new samples: According to the sample imbalance ratio, set a sampling ratio or sampling factor N to determine the number of minority class samples that need to be synthesized; for each minority class sample a, randomly select several samples from its k nearest neighbors. Assume that the selected nearest neighbor is b. For each randomly selected nearest neighbor b, construct a new sample c with the original sample a according to the formula: c = a + rand(0,1)×|a - b|, where rand(0,1) represents a randomly generated number in the interval [0,1], which is used to control the position of the synthesized sample; Repeated generation: For multiple minority class samples, repeat the above steps to generate a corresponding number of synthetic samples to balance the dataset.

[0011] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, the characteristic variables include continuous variables, categorical variables and outcome variables. The continuous variable is age. The categorical variables include the results of liquid-based thin-layer cytology, human papillomavirus (HPV) results, whether there are multiple infections, folate receptor-mediated cervical special staining results, and cotton swab judgment result characteristics. The outcome variables are pathological result characteristics, among which, The results of the liquid-based thin-layer cytology examination include: no intraepithelial lesions or malignant lesions NILM, atypical squamous cells with no clear diagnostic significance ASC-US, low-grade squamous intraepithelial lesions LSIL, atypical squamous epithelial cells that do not exclude high-grade squamous intraepithelial lesions ASC-H, high-grade squamous intraepithelial lesions HSIL, The HPV results include: negative, high-risk HPV and low-risk HPV, The multiple infections include: negative, single infection and multiple infection. The folate receptor-mediated special staining of the cervix includes no lesion and lesion.

[0012] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, for the original significant features, in order to obtain the optimal parameters of the prediction model to be established, the step of constructing a hyperparameter space is also included: Define the model: Build a decision tree as the benchmark model; Construct the hyperparameter space: define a dictionary containing the parameters to be optimized and their potential values; Set up grid search and cross validation: Use the GridSearchCV class to perform grid search and cross validation, specify the model, parameter grid, number of cross validation folds, and scoring criteria, the scoring criteria is set to AUC; Perform grid search: Call the fit method to perform a grid search, traverse all combinations in the parameter grid, and perform cross-validation on each combination; View the best parameters and the best evaluation indicators: Grid search is completed, and the best parameters and the corresponding cross-validation AUC values ​​are obtained.

[0013] Preferably, the method for constructing the cervical intraepithelial neoplasia risk prediction model further comprises the following steps: To evaluate the performance of cervical intraepithelial neoplasia risk prediction models.

[0014] In the second aspect, a cervical intraepithelial neoplasia risk prediction model includes: A data sample collection module is used to collect characteristic variables, which include continuous variables and categorical variables. The continuous variable is the age of the patient at the time of clinical examination, and the categorical variables include the results of liquid-based thin-layer cytology examination; the results of human papillomavirus; and the results of folate receptor-mediated cervical special staining; and to collect outcome variables, which are divided according to pathological results, including CIN2 and below, and CIN2 and above; The data analysis module is used to use Spearman correlation analysis to analyze all feature variables and determine the degree of correlation between each feature variable; with feature variables as input and outcome variables as output, XGBoost is used to build a model to mine the nonlinear relationship between feature variables and outcome variables, and then the SHAP algorithm is used to assign importance scores to the outcome variables to each feature variable in the nonlinear relationship; according to the outcome variables, two risk categories of CIN2 and below and CIN2 and above are divided, and whether the continuous variable of age satisfies normal distribution and homogeneity of variance at the same time is checked. If both are satisfied, the t test is selected to check the difference of the mean age of data samples at each risk level; if not, the Mann–Whitney U test is selected to check the difference of the median age of data samples at each risk level; a two-tailed p value <0.05 is used as the criterion for statistical significance, and a significance analysis is performed on the degree of correlation, importance score, and difference to screen out the original significant features; The decision tree model building module is used to build a decision tree model using the original significant features as input data, divide the data samples into a training set and a test set, and use the training set to train the decision tree model. After the training is completed, the trained decision tree model is applied to the training set and the test set to obtain the prediction result of each sample; the prediction result is extracted as a new significant feature; The artificial neural network model building module is used to merge the original significant features and the new significant features into an extended feature set, and use the extended feature set to train the artificial neural network model to obtain a cervical intraepithelial neoplasia risk prediction model.

[0015] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, an attention layer is provided between two hidden layers of the artificial neural network model, which dynamically adjusts the weights of different features according to the correlation between the features in the input extended feature set and the prediction target of the model, and the weight value range is (0,1], and the sum of all weight values ​​is 1.

[0016] Preferably, in the method for constructing the cervical intraepithelial neoplasia risk prediction model, the artificial neural network model is provided with an output layer, and the output layer uses a sigmoid activation function for binary classification. The formula for the sigmoid activation function is: Where is the output value of the sigmoid function when the input is x, x is the input value of the sigmoid function, and e is the base of the natural logarithm; The artificial neural network model was compiled using the Adam optimizer (learning rate set to 0.001) and the binary cross entropy loss function; and an early stopping strategy was introduced. When the loss on the validation set did not improve for 5 consecutive cycles, the training process of the artificial neural network model would automatically stop and restore the model to the optimal weight state.

[0017] Preferably, in the cervical intraepithelial neoplasia risk prediction model, when constructing a decision tree model, a grid search algorithm and a 5-fold cross validation are used to obtain the optimal parameters of the model, wherein, in decision tree generation, a DecisionTreeClassifier class is created based on the CART algorithm in scikit-learn, and Gini impurity or mean square error is used for regression tree as a splitting criterion, and the parameter criterion='gini' is set. Starting from the root node, the algorithm calculates all possible split points and selects the best split point based on the Gini impurity. According to the splitter='random' parameter, the algorithm randomly selects a subset of the original significant features to calculate at each split. In the CART algorithm, min_samples_split=5 is set. Set max_features='sqrt'.

[0018] Preferably, the cervical intraepithelial neoplasia risk prediction model further includes: Data collection module: It is used to collect the following clinical indicators of women aged 18-100: liquid-based thin-layer cytology (TCT) results, human papillomavirus (HPV) test results, folate receptor-mediated cervical special staining (FRD) results, and cervical pathological biopsy results; Data preprocessing module: It is used to first extract feature variables from the collected data, then fill in missing values, and then divide the data set into training set and test set using random stratified sampling. For unbalanced data sets, the synthetic minority oversampling technique (SMOTE) is used to oversample positive samples in the training set, including: Calculate k nearest neighbors: For each sample a in the minority class, use the Euclidean distance as the standard to calculate its distance to all samples in the minority class sample set to obtain its k nearest neighbors, where k is a hyperparameter indicating the number of nearest neighbor samples selected; Select neighbors and synthesize new samples: According to the sample imbalance ratio, set a sampling ratio or sampling factor N to determine the number of minority class samples that need to be synthesized; for each minority class sample a, randomly select several samples from its k nearest neighbors. Assume that the selected nearest neighbor is b. For each randomly selected nearest neighbor b, construct a new sample c with the original sample a according to the formula: c = a + rand(0,1)×|a - b|, where rand(0,1) represents a randomly generated number in the interval [0,1], which is used to control the position of the synthesized sample; Repeated generation: For multiple minority class samples, repeat the above steps to generate a corresponding number of synthetic samples to balance the dataset.

[0019] Preferably, in the cervical intraepithelial neoplasia risk prediction model, the characteristic variables include continuous variables, categorical variables and outcome variables. The continuous variable is age. The categorical variables include the results of liquid-based thin-layer cytology, HPV results, whether there are multiple infections, folate receptor-mediated cervical special staining results, and cotton swab judgment result characteristics. The outcome variables are pathological result characteristics, among which, The results of the liquid-based thin-layer cytology examination include: no intraepithelial lesions or malignant lesions NILM, atypical squamous cells with no clear diagnostic significance ASC-US, low-grade squamous intraepithelial lesions LSIL, atypical squamous epithelial cells that do not exclude high-grade squamous intraepithelial lesions ASC-H, high-grade squamous intraepithelial lesions HSIL, The HPV results include: negative, high-risk HPV and low-risk HPV, The multiple infections include: negative, single infection and multiple infection. The folate receptor-mediated special staining of the cervix includes no lesion and lesion.

[0020] Preferably, in the cervical intraepithelial neoplasia risk prediction model, for the original significant features, in order to obtain the optimal parameters of the prediction model to be established, the step of constructing a hyperparameter space is also included: Define the model: Build a baseline model; Construct the hyperparameter space: define a dictionary containing the parameters to be optimized and their potential values; Set up grid search and cross validation: Use the GridSearchCV class to perform grid search and cross validation, specify the model, parameter grid, number of cross validation folds, and scoring criteria, the scoring criteria is set to AUC; Perform grid search: Call the fit method to perform a grid search, traverse all combinations in the parameter grid, and perform cross-validation on each combination; View the best parameters and the best evaluation indicators: Grid search is completed, and the best parameters and the corresponding cross-validation AUC values ​​are obtained.

[0021] Preferably, the cervical intraepithelial neoplasia risk prediction model further includes: The model evaluation module is used to evaluate the performance of the cervical intraepithelial neoplasia risk prediction model based on the test set.

[0022] According to a third aspect, an electronic device comprises: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes any one of the methods described.

[0023] In a fourth aspect, a storage medium stores a computer program, which, when executed by a processor, implements any of the methods described above.

[0024] The embodiments of the present invention have at least the following beneficial effects: (1) Improved model performance The cervical intraepithelial neoplasia risk prediction model of the present invention shows high accuracy and reliability in predicting the risk of cervical intraepithelial neoplasia. Compared with other models, the model performance has been significantly improved, providing a useful tool for clinical practice.

[0025] (2) Enhance the model’s recognition of key features The introduction of the attention mechanism enables the model to dynamically adjust feature weights and pay more attention to features that have an important impact on the prediction results, thereby improving the prediction accuracy and robustness of the model.

[0026] (3) Improving user trust Traditional explanation methods for machine learning only reflect the importance of features, and often fail to fully reveal the complex interactions between features and between features and prediction results. This paper uses Shapley Additive Explanations (SHAP) to provide a quantitative assessment of the contribution of each feature in the model to the prediction. This method ensures a fair distribution of feature contributions, so that the explanation results reflect both the importance of the features and the specific relationship between the features and the prediction results, making the decision-making process of the model more transparent and understandable.

[0027] (4) Improving the generalization ability of disease prediction models By integrating decision trees and artificial neural networks and combining the advantages of both, the model can better generalize to unseen data and reduce the overfitting problem that may exist in a single algorithm model.

[0028] (5) Improving the efficiency of clinical diagnosis In the existing cervical intraepithelial neoplasia risk prediction, the risk cannot be accurately estimated, which may lead to untimely treatment or overtreatment. The present invention realizes the risk assessment of cervical intraepithelial neoplasia by combining clinical screening indicators and integrated models, greatly improving the efficiency of clinical diagnosis.

[0029] Other advantages, objectives, and features of the embodiments of the present invention will be reflected in part through the following description, and in part will be understood by those skilled in the art through study and practice of the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The present invention is a flowchart of a method for constructing a cervical intraepithelial neoplasia risk prediction model in one embodiment of the present invention.

[0031] Figure 2 A honeycomb diagram of characteristic variable analysis in one embodiment of the present invention.

[0032] Figure 3 A partial explanation diagram of a single prediction in one embodiment of the present invention.

[0033] Figure 4 Receiver operating characteristic curves of each model in one embodiment of the present invention.

[0034] Figure 5 This is a calibration curve diagram of the model in one embodiment of the present invention. DETAILED DESCRIPTION

[0035] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the embodiments according to the description.

[0036] As two important algorithms in the field of machine learning, decision tree (DT) and artificial neural network (ANN) each have distinct characteristics and advantages. Decision tree is a model based on tree structure, which performs classification or regression by recursively dividing data sets, and has the advantages of being intuitive, easy to understand and easy to explain. Artificial neural network is an algorithm that simulates the structure and working principle of the human brain, with strong learning and generalization capabilities, especially when dealing with complex and nonlinear problems. The present invention adopts a feature-level integrated learning strategy to integrate decision tree and artificial neural network at the feature level. This integration method can make full use of the advantages of both, retaining the intuitive, easy to understand and easy to explain characteristics of decision tree, and giving play to the powerful learning and generalization capabilities of neural network. At the same time, through the integration at the feature level, the present invention can generate richer and more useful feature representations, thereby improving the performance of the model.

[0037] (1) Model explanation The SHAP value assigns a weight to each feature that affects the model prediction based on the Shapley value. This assignment provides a clear explanation for each prediction, making the model's decision-making process more transparent.

[0038] Most disease prediction models use traditional machine learning algorithms for feature importance analysis. Based on the SHAP method, the present invention draws a honeycomb diagram for the entire model (global explanation) to visualize the contribution of feature variables to the model. In addition, the present invention also visualizes the prediction of a single patient (local explanation). The force plot is an intuitive visualization tool that shows how each feature pushes the model output up or down. This visualization allows non-expert users to understand the reasons for the model prediction.

[0039] (2) Disease prediction models are mostly based on the comparison of machine learning algorithms, and the model with the best performance is selected from them after model comparison. The present invention not only constructs multiple machine learning algorithm models for comparison, but also develops an integrated model. This integrated model combines two algorithms, decision tree and artificial neural network. Decision trees are good at handling classification tasks and can capture nonlinear relationships between features; while artificial neural networks have powerful pattern recognition capabilities, especially good at handling complex and high-dimensional data. This fusion helps to combine the advantages of both and improve the generalization performance of the model.

[0040] (3) The present invention adopts a feature-level ensemble learning strategy. The model integrates the decision tree (DT) and the artificial neural network (ANN) at the feature level. This is different from traditional model-level integration (such as bagging, boosting or stacking), in which multiple models are integrated at the final prediction level. Feature-level integration expands the input feature space of the artificial neural network by introducing the prediction results of the decision tree as new features, thereby being able to capture more useful information.

[0041] (4) Introduction of attention mechanism. An attention mechanism layer is added between the hidden layers of the artificial neural network. This attention mechanism layer can dynamically adjust the weights of different features, so that the model can pay more attention to the features that have an important impact on the prediction results during the training process. This helps to improve the model's ability to identify key features and may improve the model's accuracy and generalization performance.

[0042] In order to enable those skilled in the art to better understand the technical solution of the present invention, the following embodiments are provided for further explanation: like Figure 1 As shown, the method for constructing a cervical intraepithelial neoplasia risk prediction model of the present invention comprises: Step S1: Data collection.

[0043] The data comes from individual data of patients who visited the gynecology department of a certain hospital due to cervical lesions from 2018 to 2022.

[0044] The test subjects need to avoid menstruation and avoid behaviors that may affect the test results, such as sexual intercourse, vaginal douching and vaginal medication within 24 hours before the ThinPrep cytological test (TCT) to ensure the accuracy and reliability of the data.

[0045] Step S11: ThinPrep cytological test (TCT).

[0046] The clinician gently inserts the TCT sampling brush into the examinee's endocervical canal and rotates the sampling brush for several weeks to collect cells from the cervical os and endocervical canal. After the sampling is completed, the sampling brush is placed in a test tube containing a cell preservation solution and gently stirred several times to ensure that the cells are detached and preserved. Afterwards, the sampling brush is removed, the test tube is sealed and labeled with the examinee's information. The test tube is sent to the laboratory for processing within 24 hours after sampling. In the laboratory, the sample in the test tube is first placed in a centrifuge to separate the cells. The centrifuged cell suspension is then dropped onto a glass slide and prepared into a thin layer of cell smears by mechanical devices such as a cell smear machine. The smear is then fixed in a 95% ethanol fixative and stained using the Papanicolaou staining method. The clinician observes the cell morphology, arrangement, and structure of the smear under a microscope for detailed classification. According to the cytological diagnostic criteria (Bethesda classification system), the results were divided into no intraepithelial lesion or malignancy (NILM), atypical squamous cells of no definite diagnostic significance (ASC-US), low-grade squamous intraepithelial lesion (LSIL), atypical squamous cells that do not exclude high-grade squamous intraepithelial lesions (ASC-H), and high-grade squamous intraepithelial lesions (HSIL).

[0047] Step S12: human papillomavirus (HPV) detection.

[0048] Use a swab to collect cervical exfoliated cell samples. Place the sample in a test tube containing preservation fluid and shake it to ensure that the cells are fully shed. HPV typing is detected by combining in vitro amplification of polymerase chain reaction (PCR) and reverse dot DNA hybridization. The specific operation steps are carried out according to the instructions of the kit. Among the high-risk HPV types such as HPV31, HPV33, HPV35, HPV39, HPV45, HPV51, HPV52, HPV56, HPV58, HPV59, HPV66, and HPV68, at least one type is found, which is considered positive, otherwise it is considered negative.

[0049] Step S13: Folate receptor-mediated tumor detection (FRD) of the cervix.

[0050] In the FRD test, the yellowish-brown live cell stain composed of folic acid derivatives, acetic acid and reduced methylene blue improves the redox properties of the biological stain methylene blue, and can present different color change reaction spectra in the redox system of cervical tumor cells. Routinely expose the cervix, squeeze the liquid bottle to keep the cotton swab head downward, so that the dyeing solution flows to the cotton swab head. When the solution soaks 1 / 2 of the cotton ball, use the cotton swab head with the reagent to rotate 15 to 20 times on the surface of the cervix. You can use a little force to press the cervical opening for 5s, and then take out the cotton swab for observation. Use the color card for comparison and judgment, and the results within 2 minutes shall prevail. If the color of the cotton ball does not change, it indicates that the exfoliated cells are normal and the judgment is negative.

[0051] Step S14: Cervical pathology biopsy Using an electronic colposcope and biopsy forceps, standard sampling is performed on the cervix at the specified 3, 6, 9, and 12 o'clock positions. This is only for testing under normal conditions. If there is an abnormality, more sampling is performed in the abnormal area. The obtained samples are immediately placed in a liquid containing 10% formaldehyde to fix them, and then handed over to the pathology department for further examination. According to the diagnostic criteria of pathology, the results include chronic cervicitis or cervical polyps, cervical intraepithelial neoplasia (CIN 1, CIN 2, and CIN 3), squamous cell carcinoma (SCC), microinvasive carcinoma, adenocarcinoma in situ (AIS), adenocarcinoma (ACC), and cervical cancer (CC).

[0052] Step S2: Data preprocessing Step S21: Sample information screening Patient inclusion criteria: (1) The patient is a female aged 18-100 years old; (2) The pathological examination results are complete.

[0053] According to statistics of individual data of patients who visited the gynecology department of a certain hospital due to cervical lesions from 2018 to 2022, 470 clinical samples met the inclusion criteria, and the data of these 470 clinical samples were subsequently used for modeling.

[0054] Step S22: Label encoding Feature variables: (1) Continuous variables: Age: the patient's age at the time of testing.

[0055] (2) Categorical variables

[0056] ThinPrep cytological test (TCT) results: no intraepithelial lesions or malignant lesions (NILM), atypical squamous cells of undetermined diagnostic significance (ASC-US), low-grade squamous intraepithelial lesions (LSIL), atypical squamous cells that do not exclude high-grade squamous intraepithelial lesions (ASC-H), high-grade squamous intraepithelial lesions (HSIL).

[0057] HPV results were categorized according to human papillomavirus (HPV) genotype: negative, high-risk HPV (HR-HPV) (HPV16, 18, 31, 33, 35, 39, 45, 51, 52, 58, 59, 66, and 68), and low-risk HPV (LR-HPV) (positive genotypes other than high-risk HPV).

[0058] Whether there are multiple infections (multiple infection): divided into negative, single infection and multiple infection according to the number of HPV genotypes infected; Folate receptor-mediated tumor detection (FRD): no lesions (the swab is light green or colorless); lesions (the swab is dark green, black or blue).

[0059] Cotton-tipped swab results: negative, equivocal, positive.

[0060] Outcome variables: Pathological results: CIN 2- (CIN 2 and below): including chronic cervicitis or cervical polyps, cervical intraepithelial neoplasia grade 1 (CIN 1). CIN 2+ (CIN 2 and above): including cervical intraepithelial neoplasia CIN 2, CIN 3, squamous cell carcinoma (SCC), microinvasive carcinoma, adenocarcinoma in situ (AIS), adenocarcinoma (ACC) and cervical cancer (CC).

[0061] The categorical variables are labeled according to the above description, as shown in Table 1.

[0062] Step S23: Missing value filling MICE interpolation method.

[0063] Step S24: Data division The random stratified sampling method is used to divide the data set into training set and test set with a ratio of 8:2.

[0064] Step S25: Imbalanced dataset processing In view of the problem of imbalanced data sets, the synthetic minority oversampling technique (SMOTE) is used to oversample the positive samples in the training set. The SMOTE technique balances the categories of the data set by increasing the number of minority classes in the K nearest neighbors so that the number of samples of the minority class and the majority class is close to equal.

[0065] (1) Calculate k nearest neighbors: For each sample a in the minority class, the distance to all samples in the minority class sample set is calculated using the Euclidean distance as the standard to obtain its k nearest neighbors. Here k is a hyperparameter, indicating the number of nearest neighbor samples selected.

[0066] (2) Select neighbors and synthesize new samples: According to the sample imbalance ratio, a sampling ratio or sampling multiplier N is set to determine the number of minority class samples that need to be synthesized.

[0067] Table 1 Feature description For each minority class sample a, several samples are randomly selected from its k nearest neighbors (the number is determined by the sampling rate N), assuming that the selected nearest neighbor is b.

[0068] Then, for each randomly selected neighbor b, a new sample c is constructed with the original sample a according to the formula: c = a + rand(0,1)×|a - b|, where rand(0,1) represents a randomly generated number in the interval [0,1], which is used to control the position of the synthetic sample.

[0069] (3) Repeated generation: For multiple minority class samples, repeat the above steps to generate the corresponding number of synthetic samples to balance the dataset.

[0070] Step S3: Characteristic variable analysis Step S31: Feature correlation analysis Spearman correlation analysis is a non-parametric statistical analysis method for the correlation between two variables after sorting. The consistency or similarity of the two variables after sorting is measured by calculating the Spearman correlation coefficient ρ, and its value range is [-1, 1]. Unlike the Pearson correlation coefficient, the Spearman correlation coefficient does not rely on the normal distribution assumption of the data, so it has a wider applicability in practical applications. It is applicable to continuous data and ranked data (such as rank, ranking), and does not require the data to follow a normal distribution.

[0071] Spearman correlation analysis evaluates the degree of correlation between two variables by calculating the difference in the ranks of the two variables after they are sorted. Specifically, for each pair of observations, their ranks in their respective variables are calculated and the difference between the two ranks (d i ). Then, a statistic is calculated based on these rank differences, namely the Spearman correlation coefficient ρ. The calculation formula is as follows. Where n represents the number of observations.

[0072] The range and interpretation of the Spearman correlation coefficient are as follows: When ρ = 1, it means that the two variables are completely positively correlated, that is, their rankings are exactly the same.

[0073] When ρ=-1, it means that the two variables are completely negatively correlated, that is, their rankings are completely opposite.

[0074] When ρ = 0, it means that the two variables are uncorrelated, that is, their order is irrelevant.

[0075] Therefore, by observing the value of the Spearman correlation coefficient, we can determine whether there is a monotonic relationship between the two variables (that is, when one variable increases, the other variable also increases or decreases, but not necessarily a linear relationship). Feature correlation analysis aims to select the most representative features from the original feature set to improve the performance and interpretability of the model.

[0076] Step S32: Feature importance analysis Random Forest: Random Forest makes predictions by building multiple decision trees and combining their results. It uses Gini impurity criterion='gini' as the splitting criterion and calculates feature importance based on the average reduction of the Gini impurity of the feature across all trees.

[0077] SHAP is an explanation method based on game theory that can assign an importance score to each feature to explain the model's prediction results. The core idea is to decompose the contribution of each feature and calculate the marginal contribution of the feature to the model output. Using SHAP, the model's prediction basis for each sample can be visualized, making the model more transparent.

[0078] First, the training set samples are used as background data (background data is used for model explanation calculations, and it represents the data range that the model has seen during training). Then the background data and the test data to be explained are converted into NumPy arrays for subsequent SHAP calculations. Background data is the key to explaining the global behavior of the model. The interpreter calculates the contribution of the features in each sample to the prediction results based on the background data. Next, a SHAP interpreter is created through shap.Explainer. shap.Explainer automatically selects the appropriate SHAP algorithm based on the input model and background data. model is the previously trained model, and background_np is the background data. Use the SHAP interpreter to calculate the SHAP value of the test set.

[0079] The honeycomb chart, also known as the "bee swarm chart" or "SHAP summary chart", is a special visualization tool used to display SHAP values. In the honeycomb chart, each point represents a value of a feature, and its position reflects the contribution of the feature value to the model prediction results (the horizontal axis represents the SHAP value, and the vertical axis usually represents the feature value or feature category). The color of the point represents the positive and negative impact of the feature value (red represents a positive impact, and blue represents a negative impact). By observing the honeycomb chart, you can intuitively see which features have the greatest impact on the model prediction results. Figure 2 As shown in the figure, the order of feature importance is liquid-based thin layer cytology, age, cotton swab judgment results, HPV severity, multiple infections, and folate receptor-mediated cervical special staining, indicating that these features play a key role in predicting the risk level of CIN. The influence of feature values ​​on the prediction results. The red points are mainly distributed in the positive SHAP value area, indicating that higher values ​​of this feature tend to increase the risk of CIN. On the contrary, lower feature values ​​(blue) are more likely to reduce the risk of CIN.

[0080] The single prediction explanation force diagram is applied to the construction of the online prediction platform. The feature values ​​of a single patient are input, and the CIN risk is predicted and the corresponding single force diagram is obtained. The single prediction explanation force diagram shows the feature values ​​of a single patient and their contribution to the model prediction results. In this figure, each feature has a corresponding bar, indicating the contribution of the feature to the prediction result (the length of the bar indicates the SHAP value). The color of the bar also indicates positive and negative effects.

[0081] By observing these plots, you can understand how the model makes predictions based on feature values ​​and identify the features that have the greatest impact on patient risk prediction results.

[0082] Step S33: Feature Difference and Correlation Analysis (1) Difference analysis: Analysis of differences in patient variables between the two risk categories (CIN 2- and CIN 2+).

[0083] For continuous variables, t-test or Mann-Whitney U test was used: t-test: When the data satisfy the normal distribution and the variance is homogeneous, it is used to compare whether the means of two independent groups of samples are significantly different.

[0084] Mann-Whitney U test: When the data do not meet the normal distribution or the variance is unequal, it is used to compare whether the medians of two independent groups of samples are significantly different.

[0085] For categorical variables, chi-square test or Fisher's exact test was used for analysis of differences: Chi-square test: It is used to test the independence between two categorical variables, that is, whether they are associated.

[0086] Fisher's exact test: Used to test the association between two categorical variables when the sample size is small or some frequencies are small.

[0087] When evaluating the degree of association between the independent variable and the dependent variable, and whether this association is statistically significant, a two-tailed p-value < 0.05 is used as the criterion for judging statistical significance. That is, if the p-value is less than 0.05, it is considered that the difference between the two groups is not accidental, but is statistically significant.

[0088] (2) Univariate and multivariate logistic regression analysis: Univariate logistic regression analysis: used to evaluate the relationship between a single variable and disease risk (such as CIN), by calculating the odds ratio (OR) and 95% confidence interval (CI) of each variable to quantify the effect of the variable on disease risk.

[0089] Multivariate logistic regression analysis: The independent relationship between multiple variables and disease risk was evaluated while controlling for the influence of other variables. Similarly, OR and 95% CI were also calculated.

[0090] Spearman correlation analysis was used to analyze all feature variables to determine the degree of correlation between each feature variable. With feature variables as input and outcome variables as output, XGBoost was used to build a model to explore the nonlinear relationship between feature variables and outcome variables, and the SHAP algorithm was used to assign importance scores to the outcome variables for each feature variable in the nonlinear relationship. According to the outcome variables, two risk categories were divided: CIN level 2 and below and CIN level 2 and above. It was checked whether the continuous variable age satisfied normal distribution and homogeneity of variance at the same time. If both conditions were met, the t-test was used to check the differences in the mean age of data samples at each risk level. If not, the Mann–Whitney U test was used to check the differences in the median age of data samples at each risk level. A two-tailed p value < 0.05 was used as the criterion for statistical significance, and significance analysis was performed on the degree of correlation, importance score, and difference to screen out the original significant features.

[0091] Step S4: Model construction and optimization to obtain a new model Step S41: Building a baseline model (1) Building a decision tree model Create a decision tree model based on the scikit-learn library.

[0092] Use the grid search algorithm and 5-fold cross validation to select the optimal parameters for training the model.

[0093] Before building the final model, in order to obtain the optimal parameters of the model, a hyperparameter space was constructed, which contained a range of potential values ​​for each parameter. This approach aims to include different combinations of model parameters to obtain the best model. This hyperparameter space was constrained by a grid search algorithm to iteratively explore parameter values. For each parameter combination, a 5-fold cross validation was performed. Based on the cross validation results, the hyperparameter set that showed the best performance (with the best AUC as the criterion) was selected.

[0094] Specifically: First, a model is built based on the decision tree algorithm.

[0095] Then, construct the hyperparameter space: define a dictionary containing the parameters to be optimized and their potential values.

[0096] The third step is to set up grid search and cross validation: Use the GridSearchCV class to perform grid search and cross validation, specifying the model, parameter grid, number of cross validation folds, and scoring criteria (AUC is set here).

[0097] Finally, we perform a grid search: We call the fit method to perform a grid search, iterating over all combinations in the parameter grid and performing cross validation on each combination.

[0098] Finally, check the optimal parameters and the best evaluation indicators: After the grid search is completed, the optimal parameters and the corresponding cross-validation AUC values ​​can be obtained.

[0099] (2) Building an artificial neural network (ANN) model Basic network layer construction: Sequential model is used as the network framework, and fully connected layers (Dense) and Dropout layers are added in sequence. The fully connected layer is responsible for feature extraction and integration, while the Dropout layer effectively reduces the model's excessive dependence on training data and reduces the risk of overfitting by randomly discarding some neuron outputs.

[0100] Dropout ratio adjustment: Based on the original model, we try to increase the Dropout ratio from 0.2 to 0.3, in order to further enhance its generalization ability while maintaining the model performance.

[0101] Output layer configuration: The output layer uses the softmax activation function to ensure that the sum of the output values ​​is 1 and each value represents the predicted probability of the corresponding category.

[0102] Early stopping mechanism introduced: To prevent the model from falling into overfitting during training, the EarlyStopping callback function is introduced. This function monitors the change of the validation set loss. When the loss does not improve in 5 consecutive cycles, it will automatically stop training and restore the model to the optimal weight state.

[0103] Training parameter configuration: 25 training cycles (epochs) and a batch size (batch_size) of 64 were set to balance training efficiency and model performance.

[0104] Step S42: Constructing an artificial neural network and decision tree feature-level integrated learning model (1) Training and feature extraction of decision tree model A decision tree model was constructed and the optimal parameters of the model were obtained using the grid search algorithm and 5-fold cross validation.

[0105] a. Feature selection: based on the clinical screening indicators obtained above.

[0106] b. Decision tree generation: Create a DecisionTreeClassifier class based on the CART algorithm in scikit-learn. Use Gini impurity (criterion='gini') (mean square error for regression trees) as the splitting criterion. Here, setting the parameter criterion='gini' specifies the use of Gini impurity.

[0107] Starting from the root node, the algorithm calculates all possible split points and selects the best split point based on the Gini impurity.

[0108] Depending on the splitter='random' parameter, the algorithm randomly selects a subset of features to consider at each split, which helps improve the robustness of the model.

[0109] c. Decision tree pruning: Pruning is done to prevent overfitting. Overfitting means that the model performs well on the training data but performs poorly on unknown data. In the CART algorithm, pruning is achieved by setting the min_samples_split=5 parameter, which ensures that the node is split only when it contains at least 5 samples.

[0110] The max_features='sqrt' parameter also plays a role in pruning, as it limits the number of features considered at each split, thus reducing the complexity of the model.

[0111] After the decision tree model is trained, its prediction results are extracted as new features. This new feature actually represents the classification tendency or prediction result of the decision tree model for the original data point, thus realizing the mapping from the original feature space to the decision tree prediction space.

[0112] (2) Construction and training of artificial neural networks Feature combination: Combine the new features extracted by the decision tree with the original features to form an extended feature set X_train_combined. This step makes full use of the classification ability of the decision tree and the pattern recognition ability of the artificial neural network to capture more valuable information by expanding the feature space.

[0113] A simple artificial neural network model was constructed, including two hidden layers (64 neurons in the first layer and 32 neurons in the second layer), and an output layer (1 neuron, using the sigmoid activation function for binary classification). In order to further improve the model's ability to identify key features, an attention mechanism layer was added between the hidden layers. This layer can dynamically adjust the weights of different features, so that the model can focus more on features that have an important impact on the prediction results during training. The formula of the Sigmoid activation function is: The formula is the output value of the sigmoid function when the input is x, x is the input value of the sigmoid function, and e is the base of the natural logarithm.

[0114] The artificial neural network model is compiled using the Adam optimizer (learning rate set to 0.001) and the binary cross entropy loss function. To prevent overfitting, an early stopping strategy is introduced, and the training process will automatically stop when the loss on the validation set does not improve for 5 consecutive cycles.

[0115] Step S43: Constructing a comparison model The decision tree (DT), random forest (RF), logistic regression (LR), support vector machine (SVM), nearest neighbor (KNN), gradient boosting, extreme gradient boosting (XGBoost), Gaussian naive Bayes (Gaussian NB), lightweight gradient boosting (LightGBM), categorical feature gradient boosting (CatBoost), extreme random tree (ET), stochastic gradient descent (SGD), and adaptive boosting (AdaBoost) algorithms are used to build comparison models. It should be understood that each algorithm is modeled separately here.

[0116] XGBoost model is built based on xgboost library. CatBoost model is built based on catboost library. LGBM model is built based on lightgbm library. Other algorithm models are created based on scikit-learn library.

[0117] Based on the scikit-learn library, the grid search algorithm and 5-fold cross validation are used to select the optimal parameters for training the model.

[0118] Step S5: Model evaluation and comparison The following indicators were used to evaluate the model performance: accuracy, precision, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), F1 score, area under the receiver operating characteristic curve (AUC) and calibration curve.

[0119] Accuracy refers to the proportion of correctly predicted results to the total samples. It is used to describe the accuracy of the model and is the most commonly used classification performance indicator. It is used to evaluate the overall performance of the classification model. The higher the accuracy, the better the model performance.

[0120] Precision refers to the probability that a sample is actually a positive example among all samples predicted to be positive examples. Precision is used to measure the accuracy of a classifier in predicting the positive class.

[0121] Sensitivity refers to the probability of a sample being predicted as a positive sample when it is actually a positive sample. In fields such as medical diagnosis, sensitivity is used to evaluate the model's ability to identify positive samples. High sensitivity means that the model can identify more positive samples.

[0122] Specificity refers to the ratio of all negative examples predicted to be correct to all actual negative examples. In fields such as medical diagnosis, specificity is used to evaluate the model's ability to identify negative examples. High specificity means that the model can more accurately identify negative examples.

[0123] The F1 score is a metric used to evaluate the balance between precision and recall in a recommendation system or classification system. It is the harmonic mean of precision and recall, providing a single score that takes both into account.

[0124] The area under the receiver operating characteristic curve (AUC) is used to measure the classifier performance. The closer the AUC is to 1, the better the classification performance.

[0125] The calibration curve is used to evaluate the accuracy of the classifier's predicted probabilities. It shows the relationship between the probabilities predicted by the classifier and the actual observed results.

[0126] As shown in Table 2, TP represents the number of samples correctly predicted as CIN 2-, FN represents the number of samples incorrectly predicted as CIN 2-, FP represents the number of samples incorrectly predicted as CIN 2+, and TN represents the number of samples correctly predicted as CIN 2+.

[0127] Table 2 Classification confusion matrix The models were evaluated based on the above indicators, and the results are shown in Table 3. The receiver operating characteristic curves of all models are shown in Table 3. Figure 4 and Figure 5As shown. After comprehensive evaluation, this model (based on the integrated model of artificial neural network and decision tree) has the best performance (AUC = 0.9030) and an accuracy rate of 86.46%. This shows that the cervical intraepithelial neoplasia risk prediction model provided in this application has higher accuracy and reliability in diagnosing the risk of cervical intraepithelial neoplasia, and has significant advantages over traditional models.

[0128] Table 3 Comprehensive performance evaluation of the model The present invention also provides a cervical intraepithelial neoplasia risk prediction model, comprising: A data sample collection module is used to collect characteristic variables, which include continuous variables and categorical variables. The continuous variable is the age of the patient at the time of clinical examination, and the categorical variables include the results of liquid-based thin-layer cytology examination; the results of human papillomavirus; and the results of folate receptor-mediated cervical special staining; and to collect outcome variables, which are divided according to pathological results, including CIN2 and below, and CIN2 and above; The data analysis module is used to use Spearman correlation analysis to analyze all feature variables and determine the degree of correlation between each feature variable; with feature variables as input and outcome variables as output, XGBoost is used to build a model to mine the nonlinear relationship between feature variables and outcome variables, and then the SHAP algorithm is used to assign importance scores to the outcome variables to each feature variable in the nonlinear relationship; according to the outcome variables, two risk categories of CIN2 and below and CIN2 and above are divided, and whether the continuous variable of age satisfies normal distribution and homogeneity of variance at the same time is checked. If both are satisfied, the t test is selected to check the difference of the mean age of data samples at each risk level; if not, the Mann–Whitney U test is selected to check the difference of the median age of data samples at each risk level; a two-tailed p value <0.05 is used as the criterion for statistical significance, and a significance analysis is performed on the degree of correlation, importance score, and difference to screen out the original significant features; The decision tree model building module is used to build a decision tree model using the original significant features as input data, divide the data samples into a training set and a test set, and use the training set to train the decision tree model. After the training is completed, the trained decision tree model is applied to the training set and the test set to obtain the prediction result of each sample; the prediction result is extracted as a new significant feature; The artificial neural network model building module is used to merge the original significant features and the new significant features into an extended feature set, and use the extended feature set to train the artificial neural network model to obtain a cervical intraepithelial neoplasia risk prediction model.

[0129] The present invention builds an online prediction tool based on the shiny package of R language. The user inputs the patient's age, liquid-based thin-layer cytology, folate receptor-mediated cervical special staining, HPV, multiple infections, and cotton swab judgment result information to be predicted, and calls the cervical intraepithelial neoplasia risk prediction model of the present invention, which is a learning model based on decision tree and artificial neural network feature level integration, predicts the patient's cervical intraepithelial neoplasia risk (high risk or low risk), and provides a single force graph analysis for each patient. Figure 3 In the figure, the starting point represents the baseline value (expected_value) of the model. The contribution of each feature is represented by a colored bar, and the length of the bar represents the impact of the feature on the final predicted value. The red bar represents a positive contribution, that is, the feature increases the predicted value, and the blue bar represents a negative contribution, that is, the feature decreases the predicted value. The end point represents the final predicted value of the model for the sample, which is the sum of the baseline value plus the contribution of all features, which is 0.63 here.

[0130] The present invention also provides an electronic device, which includes: at least one processor, and a memory connected to the at least one processor in communication, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute a method. For example, the above-mentioned memory and processor are connected together via a bus, and can be a general memory and processor, which is not specifically limited here. When the processor runs the computer program stored in the memory, it can execute the training method, device and recommendation method and device of the recommendation model of the contrast learning sequence based on the self-guided mechanism of the present invention. The electronic device may include but is not limited to: a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile computing device, a smart phone, a tablet computer, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable computing device, and the like.

[0131] The present invention also provides a storage medium on which a computer program is stored, and when the program is executed by a processor, a method is implemented. For specific implementation, please refer to the method embodiment, which will not be repeated here. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for the function of any embodiment of the training method, device and recommendation method and device of the recommendation model of the contrast learning sequence of the above-mentioned self-booting mechanism is stored, and the computer or processor of the system or device reads and executes the instructions stored in the storage medium. The program code read from the storage medium itself can implement the function of any one of the embodiments in the above-mentioned embodiments, so the machine-readable code and the storage medium storing the machine-readable code constitute a part of the present invention. The storage medium includes but is not limited to a floppy disk, a hard disk, a magneto-optical disk, an optical disk, a magnetic tape, a non-volatile memory card and a ROM. The program code can also be downloaded from a server computer or a cloud via a communication network.

[0132] It should be noted that, in the above-mentioned processes and system structures, not all steps and modules are necessary, and some steps and units can be ignored according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure. A module or unit may be implemented by the same physical entity, a module or unit may be implemented by multiple physical entities respectively, and a module or unit may also be implemented by multiple components in multiple independent devices.

[0133] Although the embodiments of the present invention are disclosed above, they are not limited to the applications listed in the specification and the embodiments. It can be fully applied to various fields suitable for the embodiments of the present invention. For those familiar with the art, other modifications can be easily realized. Therefore, without departing from the general concept defined by the claims and equivalent scopes, the embodiments of the present invention are not limited to the specific details and the legends shown and described here.

Claims

1. A method for constructing a cervical intraepithelial neoplasia risk prediction model, characterized in that: The steps include: Data sample collection step: collecting characteristic variables, the characteristic variables include continuous variables and categorical variables, the continuous variable is the age of the patient at the time of clinical examination, and the categorical variables include the results of liquid-based thin layer cytology examination and human papillomavirus results; and folate receptor-mediated special cervical staining results; and collecting outcome variables, which are divided according to pathological results, including CIN grade 2 and below, and CIN grade 2 and above; Data analysis steps: Spearman correlation analysis was used to analyze all characteristic variables to determine the degree of correlation between each characteristic variable; With feature variables as input and outcome variables as output, XGBoost is used to build a model to explore the nonlinear relationship between feature variables and outcome variables, and then the SHAP algorithm is used to assign an importance score to the outcome variable to each feature variable in the nonlinear relationship. According to the outcome variables, two risk categories were divided: CIN level 2 and below and CIN level 2 and above. The continuous variable of age was checked to see whether it satisfied both normal distribution and homogeneity of variance. If it satisfied both, the t-test was used to check the difference of the mean age of the data samples of each risk level. If it did not satisfy both, the Mann–Whitney U test was used to check the difference of the median age of the data samples of each risk level. The two-tailed p value < 0.05 was used as the statistically significant judgment standard. The correlation degree, importance score, and difference were analyzed for significance, and the original significant features were screened out. The original significant features are used as input data to build a decision tree model, and the data samples are divided into a training set and a test set. The decision tree model is trained using the training set. After the training is completed, the trained decision tree model is applied to the training set and the test set to obtain the prediction results of each sample; the prediction results are extracted as new significant features; The original significant features and the new significant features were merged into an extended feature set, and the artificial neural network model was trained using the extended feature set to obtain the cervical intraepithelial neoplasia risk prediction model.

2. The method for constructing a cervical intraepithelial neoplasia risk prediction model according to claim 1, characterized in that: An attention layer is set between the two hidden layers of the artificial neural network model, which dynamically adjusts the weights of different features according to the correlation between the features in the input extended feature set and the prediction target of the model. The weight value range is (0,1], and the sum of all weight values ​​is 1.

3. The method for constructing a cervical intraepithelial neoplasia risk prediction model according to claim 1, characterized in that: The artificial neural network model is provided with an output layer, and the output layer uses a sigmoid activation function for binary classification. The formula for the sigmoid activation function is: Where is the output value of the sigmoid function when the input is x, x is the input value of the sigmoid function, and e is the base of the natural logarithm; The artificial neural network model is compiled using the Adam optimizer and the binary cross entropy loss function; and an early stopping strategy is introduced. When the loss on the validation set does not improve within 5 consecutive cycles, the training process of the artificial neural network model will automatically stop and restore the model to the optimal weight state.

4. The method for constructing a cervical intraepithelial neoplasia risk prediction model according to claim 1, characterized in that: When building a decision tree model, use the grid search algorithm and 5-fold cross validation to obtain the optimal parameters of the model. In decision tree generation, scikit-learn creates a DecisionTreeClassifier class based on the CART algorithm, uses Gini impurity or mean square error for regression trees as the splitting criterion, and sets the parameter criterion='gini'. Starting from the root node, the algorithm calculates all possible split points and selects the best split point based on the Gini impurity. According to the splitter='random' parameter, the algorithm randomly selects a subset of the original significant features to calculate at each split. In the CART algorithm, min_samples_split=5 is set. Set max_features='sqrt' .

5. The method for constructing a cervical intraepithelial neoplasia risk prediction model according to claim 1, characterized in that: Also includes: Data collection steps: The following clinical indicators were collected from women aged 18-100 years: liquid-based thin-layer cytology results, human papillomavirus test results, folate receptor-mediated cervical special staining results, and cervical pathological biopsy results; Data preprocessing steps: First, extract feature variables from the collected data, then fill in missing values, and then use random stratified sampling to divide the data set into training set and test set. For unbalanced data sets, use synthetic minority oversampling technology SMOTE to oversample positive samples in the training set, including: Calculate k nearest neighbors: For each sample a in the minority class, use the Euclidean distance as the standard to calculate its distance to all samples in the minority class sample set to obtain its k nearest neighbors, where k is a hyperparameter indicating the number of nearest neighbor samples selected; Select neighbors and synthesize new samples: According to the sample imbalance ratio, set a sampling ratio or sampling factor N to determine the number of minority class samples that need to be synthesized; for each minority class sample a, randomly select several samples from its k nearest neighbors. Assume that the selected nearest neighbor is b. For each randomly selected nearest neighbor b, construct a new sample c with the original sample a according to the formula: c = a + rand(0,1)×|a - b|, where rand (0,1) represents a randomly generated number in the interval [0,1], which is used to control the position of the synthesized sample; Repeated generation: For multiple minority class samples, repeat the above steps to generate a corresponding number of synthetic samples to balance the dataset.

6. The method for constructing a cervical intraepithelial neoplasia risk prediction model according to claim 1, characterized in that: For the original significant features, in order to obtain the optimal parameters of the prediction model to be established, the step of constructing a hyperparameter space is also included: Define the model: Build a decision tree as the benchmark model; Construct the hyperparameter space: define a dictionary containing the parameters to be optimized and their potential values; Set up grid search and cross validation: Use the GridSearchCV class to perform grid search and cross validation, specify the model, parameter grid, number of cross validation folds, and scoring criteria, the scoring criteria is set to AUC; Perform grid search: Call the fit method to perform a grid search, traverse all combinations in the parameter grid, and perform cross-validation on each combination; View the best parameters and the best evaluation indicators: Grid search is completed, and the best parameters and the corresponding cross-validation AUC values ​​are obtained.

7. The method for constructing a cervical intraepithelial neoplasia risk prediction model according to claim 1, characterized in that: The following steps are also included: The performance of the cervical intraepithelial neoplasia risk prediction model was evaluated based on the test set.

8. A cervical intraepithelial neoplasia risk prediction model, characterized in that: include: A data sample collection module is used to collect characteristic variables, wherein the characteristic variables include continuous variables and categorical variables. The continuous variable is the age of the patient at the time of clinical examination, and the categorical variables include the results of liquid-based thin-layer cytology examination and human papillomavirus results; and folate receptor-mediated special cervical staining results; and collecting outcome variables, which are divided according to pathological results, including CIN grade 2 and below, and CIN grade 2 and above; A data analysis module is used to analyze all characteristic variables using Spearman correlation analysis to determine the degree of correlation between the characteristic variables; With feature variables as input and outcome variables as output, XGBoost is used to build a model to explore the nonlinear relationship between feature variables and outcome variables, and then the SHAP algorithm is used to assign an importance score to the outcome variable to each feature variable in the nonlinear relationship. According to the outcome variables, two risk categories were divided: CIN2 and below and CIN2 and above. The continuous variable of age was checked to see whether it satisfied normal distribution and homogeneity of variance at the same time. If it satisfied both, the t-test was used to check the difference of the mean age of the data samples of each risk level. If it did not satisfy both, the Mann–Whitney U test was used to check the difference of the median age of the data samples of each risk level. The two-tailed p value < 0.05 was used as the statistically significant judgment standard. The correlation degree, importance score, and difference were analyzed for significance, and the original significant features were screened out. The decision tree model building module is used to build a decision tree model using the original significant features as input data, divide the data samples into a training set and a test set, and use the training set to train the decision tree model. After the training is completed, the trained decision tree model is applied to the training set and the test set to obtain the prediction result of each sample; the prediction result is extracted as a new significant feature; The artificial neural network model building module is used to merge the original significant features and the new significant features into an extended feature set, and use the extended feature set to train the artificial neural network model to obtain a cervical intraepithelial neoplasia risk prediction model.

9. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor performs the method according to any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Decision tree index-based neural network air quality prediction method

    CN110363347A

  • Fault prediction method of wind generating set, corresponding device and electronic device

    CN110968069A

  • Training method and training system for tissue lesion recognition based on artificial neural network

    CN112862745A

  • Power system standby shortage risk scene identification method

    CN113452018A

  • Penetration depth prediction method based on data enhancement

    CN114036610A

Cited By

  • Cervical cell image analysis auxiliary method and system based on AI

    CN120339228A

  • Accurate early warning auxiliary diagnosis model system based on high-risk HPV positive

    CN120748693A

  • Rapid processing method for HPV (human papillomavirus) gene sequence data

    CN121034415A