Method for positive stage classification of new coronavirus S1IgG and NIgG antibody levels
Through the use of a cross -linear attention mechanism in the level classification of the new coronal virus antibody, combined with the SEQ2SEQ model and a broad -featured model, the problem of difficulty acquiring information characteristics in existing technology, and achieved more accurate and intuitive antibody level classification results.
Patent Information
- Application Number
- CN202411504973.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art has the problem of obtaining information characteristics in the classification of S1_IgG and N_IgG antibody levels of the new coronavirus. The linear attention mechanism is difficult to capture nonlinear information, while the simple nonlinear attention mechanism is difficult to capture linear information.
Adopt a sequential attention mechanism, through the SEQ2SEQ model with a wired attention mechanism, and training based on the blood test sample data set, obtain the training intermediate state data after training. Then, based on these intermediate status data, build a broad -featured additional model fittings, and introduce SCAD punishment items to obtain the fitted generalized model replacing the original linear attention mechanism for antibody level -positive classification predictions.
The intuition and accuracy of the new crown virus S1_IGG and N_IGG antibody level -positive stage classification results can be more detailed, which can more finely reflect the real situation of the data, capture linear and non -linear information, and improve model performance.
Smart Images

Figure CN119380824A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of bioinformatics, and specifically relates to a method for classifying the positive stages of novel coronavirus S1_IgG and N_IgG antibody levels. Background Art
[0002] Previous studies usually directly used deep learning to predict the specific value of antibody levels. However, directly presenting the value of antibody levels is usually abstract rather than intuitive, while classifying antibody levels into strong positive (++) and weak positive (+) provides a clearer and more direct understanding. This classification method not only helps doctors quickly understand the patient's infection status, but is also an important basis for formulating treatment plans. When the model's antibody test shows a strong positive result, it usually indicates that the patient is currently in the acute stage of COVID-19 infection or has recently been infected with the virus, and the virus is relatively active in the body. At this time, doctors should take necessary treatment measures in time to control the progression of the disease. On the other hand, a weak positive result may indicate that the patient is in the early stage of infection, the recovery stage, or has an infection but the antibody level is declining. This information can help doctors more accurately assess the patient's disease stage and formulate a personalized recovery plan. In addition, the patient's serum data is usually more complex and has more missing values, because each patient's situation is different and the indicators measured each time are different. If a certain feature of the samples in all data sets is used to fill in, the data quality will be seriously affected.
[0003] At present, we mainly rely on linear attention mechanism to obtain information features, which has difficulties in obtaining nonlinear information. Conversely, it is difficult to capture linear information by simply using nonlinear attention mechanism. Summary of the invention
[0004] The purpose of the present invention is to overcome the problems existing in the background technology and provide a method for classifying the positive stage of the new coronavirus S1_IgG and N_IgG antibody levels. By classifying the new coronavirus antibody levels and extracting features using a semi-linear attention method, the intuitiveness and accuracy of the classification results of the positive stage of the new coronavirus S1_IgG and N_IgG antibody levels are improved.
[0005] To achieve the above purpose, the technical solution of the present invention is: a method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels, comprising: Binary classification labels are set for the S1_IgG antibody level and N_IgG antibody level of the blood test samples in the blood test sample data set; Construct a Seq2Seq model with a linear attention mechanism, and train the Seq2Seq model with a linear attention mechanism based on a blood test sample dataset to obtain a trained Seq2Seq model with a linear attention mechanism; Input the blood test sample data set into the trained Seq2Seq model with a linear attention mechanism to obtain the intermediate state data corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism; Based on the corresponding intermediate state data of each blood test sample in the trained Seq2Seq model with a linear attention mechanism, the residual of the generalized additive model fitting is constructed, and the SCAD penalty term is introduced to obtain the fitted generalized additive model with a nonlinear smooth function to replace the linear attention mechanism of the Seq2Seq model with a linear attention mechanism, which is used for the classification prediction of the positive stage of the S1_IgG antibody level and N_IgG antibody level of the new coronavirus in the blood test samples to be tested.
[0006] In one embodiment of the present invention, the blood test sample data set is composed of blood test samples of multiple patients, the number of blood test samples of each patient is greater than 1, and there are N blood test samples in total. Each blood test sample has two corresponding labels, S1_IgG antibody level and N_IgG antibody level, and m features, and the m features include multiple serological indicator features and demographic indicator features.
[0007] In one embodiment of the present invention, before setting binary classification labels for the novel coronavirus S1_IgG antibody levels and N_IgG antibody levels of the blood test samples in the blood test sample data set, the blood test sample data set needs to be preprocessed, that is, for missing features in a blood test sample, the average value of the corresponding features of other blood test samples belonging to the same patient is used as the filling value; if the corresponding features in the blood test samples belonging to the same patient are all missing, the median of the corresponding features of all other blood test samples in the blood test sample data set is used as the filling value.
[0008] In one embodiment of the present invention, the method of setting binary classification labels for the new coronavirus S1_IgG antibody level and the N_IgG antibody level of the blood test samples in the blood test sample data set is: setting an antibody level threshold, marking the new coronavirus S1_IgG antibody level / N_IgG antibody level of the blood test samples in the blood test sample data set that is greater than or equal to the antibody level threshold as 1, and marking the new coronavirus S1_IgG antibody level / N_IgG antibody level of the blood test samples in the blood test sample data set that is greater than or less than the antibody level threshold as 0, and using this as the binary classification label.
[0009] In one embodiment of the present invention, the Seq2Seq model with linear attention mechanism adopts an encoder-decoder structure, wherein represents the i-th hidden state of the encoder; represents the initial hidden state of the decoder, initialized with the last hidden state of the encoder; represents the energy score of the i-th hidden state of the encoder; is the alignment function; represents the attention weight of the i-th hidden state of the encoder, 1≤i≤T, T is the number of features; represents the context vector.
[0010] In one embodiment of the present invention, each intermediate state data corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism, that is, each hidden state of the encoder corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism , the initial hidden state of the decoder and context vector .
[0011] In one embodiment of the present invention, the residual error of constructing the generalized additive model fitting and introducing the SCAD penalty term to obtain the fitted generalized additive model are specifically implemented as follows: (1) Construct the residuals of the generalized additive model fitting: The residual of the generalized additive model to fit the attention mechanism is initially expressed as follows: in, The T represents transpose; represents a nonlinear smooth function, is the dot product of the i-th hidden state of the encoder and the initial hidden state of the decoder; the meaning of the above formula is the process of fitting a corresponding linear attention weight to each nonlinear smooth function of the generalized additive model; the above formula is further simplified to: Nonlinear smoothing function It is expressed as follows: in, is a learnable parameter; is the basis function; K is a parameter to be set, indicating the number of basis functions; the basis function in the nonlinear smooth function is: in, It is the parameter to be set.
[0012] Summarizing and expanding the above formula, the final fitting residual is summarized as follows: in, represents the L2 norm; is the i-th hidden state of the encoder corresponding to the n-th blood test sample in the blood test sample dataset; is the first hidden state of the decoder corresponding to the nth blood test sample in the blood test sample data set; is the context vector corresponding to the nth blood test sample in the blood test sample dataset; N is the number of blood test samples in the blood test sample dataset; is a nonlinear smooth function whose input is a scalar; b is all the learnable parameters in the nonlinear smooth function ; The specific meaning is that by updating the parameters Minimize the residual error; (2) For the residuals of the generalized additive model fitting, the SCAD penalty term is introduced: The Sigmoid function is used to limit the value of the input nonlinear smoothing function to between 0 and 1, and the SCAD penalty term is introduced. The formula is as follows: in, is the SCAD penalty term, which contains and is the parameter to be set. Represents the absolute value of the input variable x.
[0013] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention proposes to classify the levels of new coronavirus antibodies into strong positive and weak positive, thereby improving the intuitiveness of the results.
[0014] (2) The present invention proposes a method for filling missing data values based on patient ID. Compared with the traditional method of filling data using all samples of all patients, the method of the present invention is more sophisticated; the present invention fills data from the level of a single patient, which can more accurately reflect the true situation of the data. And it is applicable to most serological data.
[0015] (3) The present invention proposes semi-linear attention, which uses a generalized additive model with a nonlinear smooth function to fit and then replace the original Seq2Seq attention solution process with a linear attention mechanism. As a result, the re-solved attention has the characteristics of the original linear attention and the subsequent nonlinear characteristics. It can capture information that cannot be captured by a single linear attention or a single nonlinear attention mechanism, thereby improving the performance of the model. Specifically, Figure 2 As shown, Figure 2 The light blue straight line in (3) represents the original linear attention, and the yellow curve is our semi-linear attention. Compared with linear attention, the semi-linear attention we proposed has nonlinear characteristics, that is, it presents a certain amplitude, and this amplitude is obtained by the smooth function during the fitting process according to the distribution information of the intermediate state data. At the same time, it also has the characteristics of linear attention, that is, it tends to be linear as a whole.
[0016] (4) The present invention proposes to use the SCAD penalty term to penalize the smoothing function, thereby reducing the complexity of the smoothing function, making the smoothing function smoother and reducing local fluctuations.
[0017] (5) The present invention adopts a deep learning model to predict the antibody level classification problem, uses the serological indicators and demographic indicators of blood samples as the input of the model, and classifies and predicts the categories of patient antibody levels. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The overall framework diagram of the model constructed by the method of the present invention.
[0019] Figure 2 There are three types of attention graphs; among them, (1) is the ordinary linear attention mechanism; (2) is the single nonlinear attention mechanism; and (3) is the semi-linear attention mechanism adopted by the present invention.
[0020] Figure 3 The confusion matrix of the model constructed by the method of the present invention and the comparison model on the S1_IgG antibody level classification task.
[0021] Figure 4 ROC and PR curves of the model constructed by the method of the present invention and the comparison model in the S1_IgG antibody level classification task.
[0022] Figure 5 The confusion matrix of the model constructed by the method of the present invention and the comparison model on the N_IgG antibody level classification task.
[0023] Figure 6 ROC and PR curves of the model constructed by the method of the present invention and the comparison model in the task of N_IgG antibody level classification. DETAILED DESCRIPTION
[0024] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0025] The present invention provides a method for classifying the positive stages of novel coronavirus S1_IgG and N_IgG antibody levels, comprising: Binary classification labels are set for the S1_IgG antibody level and N_IgG antibody level of the blood test samples in the blood test sample data set; Construct a Seq2Seq model with a linear attention mechanism, and train the Seq2Seq model with a linear attention mechanism based on a blood test sample dataset to obtain a trained Seq2Seq model with a linear attention mechanism; Input the blood test sample data set into the trained Seq2Seq model with a linear attention mechanism to obtain the intermediate state data corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism; Based on the corresponding intermediate state data of each blood test sample in the trained Seq2Seq model with a linear attention mechanism, the residual of the generalized additive model fitting is constructed, and the SCAD penalty term is introduced to obtain the fitted generalized additive model to replace the linear attention mechanism of the Seq2Seq model with a linear attention mechanism, which is used for the classification prediction of the positive stage of the S1_IgG antibody level and N_IgG antibody level of the new coronavirus in the blood test samples to be tested.
[0026] The following is the specific implementation process of the present invention.
[0027] The present invention proposes a method for classifying the positive stages of novel coronavirus S1_IgG and N_IgG antibody levels, which specifically comprises the following steps: Step 1, data set introduction and processing part. There are multiple patients in the data set of the present invention, wherein each patient usually has multiple blood test samples during hospitalization, and each sample has two corresponding S1_IgG, N_IgG antibody level labels and another m features (features include a variety of serological indicators and demographic indicators). There are many missing values of each feature in the data set of the present invention, and they are generally filled with the average value of the overall sample. However, all patients in the medical data set are usually different, and this filling will seriously affect the quality of the data. Therefore, the present invention proposes to fill in according to the patient ID. For example, if the Na level feature of the second sample of a patient is missing, the present invention can use the average value of the Na level of other samples of the patient as the filling value. However, if the Na level feature in all samples of a patient is missing, in this case, the present invention believes that the median of the Na level of all samples of all patients in the data set of the present invention is the most representative and can be used as the filling value for filling.
[0028] Step 2, label setting part. After step 1, the present invention obtains a complete data set. The sum of all sample numbers of all patients is N, and each of these N samples has m features. In addition, each sample has two labels, S1_IgG and N_IgG antibody levels. If the two antibody levels of the patient are greater than or equal to 10,000, they can be considered strongly positive, and less than 10,000 are considered weakly positive. Therefore, the present invention marks the two antibody levels greater than or equal to 10,000 as 1, and less than 10,000 as 0, as two-category labels.
[0029] Step 3: Seq2Seq model construction with linear attention mechanism. The framework of the traditional Seq2Seq model with linear attention mechanism is as follows: Figure 1 As shown in (1), is the i-th hidden state of Encoder; Represents the initial hidden state of the Decoder, initialized with the last hidden state of the Encoder; represents the energy score of the i-th hidden state of the encoder; is the alignment function; is the attention weight of the i-th hidden state; T represents the number of features; is the context vector.
[0030] Step 4: Train the Seq2Seq model with a linear attention mechanism. The present invention uses all N samples to train the Seq2Seq with a linear attention mechanism, so that it can achieve better results.
[0031] Step 5: Extraction of model intermediate state data. All N samples of the present invention are input into the trained model one by one to obtain the hidden states of each sample in the model Encoder. , the initial hidden state of the Decoder , and the context vector . These hidden states and context vectors are used as training data for the generalized additive model.
[0032] Step 6: Construction of residuals of generalized additive model fitting. It can be found that the original context vector The solution is , the solution process is similar to that of the generalized additive model ( ). Therefore, the residual of the generalized additive model to fit the attention mechanism can be initially expressed as follows: Among them The T represents transpose; represents a smooth function, whose input is the dot product of the i-th hidden state of the encoder and the initial hidden state of the decoder; the meaning of this formula is the process of fitting a corresponding linear attention weight to each nonlinear smooth function of the generalized additive model. The formula can be further simplified to: in is a scalar, is also a scalar, is a nonlinear smooth function, and T is the characteristic number. Its essence is Go to Fit Therefore, the present invention summarizes the above theory and obtains the fitting function as follows: The nonlinear smooth function Expressed as , is a learnable parameter, is the basis function, K is a parameter to be set, indicating the number of basis functions; for the basis function in the smooth function, , It is a parameter set artificially; T is the characteristic number of a sample; represents the L2 norm; is the i-th hidden state of the encoder corresponding to the n-th blood test sample in the blood test sample dataset; is the first hidden state of the decoder corresponding to the nth blood test sample in the blood test sample data set; is the context vector corresponding to the nth blood test sample in the blood test sample dataset; N is the number of blood test samples in the blood test sample dataset; is a smooth function whose input is a scalar; b is all the learnable parameters in the smooth function ; The specific meaning is that by updating the parameters Minimize the residual error; Step 7: SCAD penalty term is introduced into the residual error of the generalized additive model fitting. In order to reduce the complexity of the model and improve the robustness of the model, the present invention considers inserting SCAD penalty term to penalize the smooth function. Since the smooth function needs to be penalized, the L2 norm of the smooth function needs to be calculated, so the integral is required. However, due to the present invention The numerical range is uncertain, so there is no way to determine the upper and lower limits of the integral. Therefore, the present invention uses the Sigmoid function to limit the value of the input smooth function to between 0 and 1, so that only the integral of the smooth function from 0 to 1 can be calculated.
[0033] The formula is as follows: Among them represents the L2 norm. is the SCAD penalty term, which contains and is a parameter set by humans, among which Represents the absolute value of the input variable x. The present invention uses back propagation to update the parameters in the smoothing function .
[0034] After fitting, this generalized additive model is used to replace the original attention mechanism solution process, such as Figure 1 As shown in sub-figure (2).
[0035] Embodiment 1: Step 1, data processing part. The data set of the present invention has 552 patients and 2119 samples (each sample contains nine features, covering demographic and serological indicators, and has two antibody level labels, S1_IgG and N_IgG). Each patient has multiple samples because he has multiple blood tests during hospitalization. For data processing, the present invention proposes to fill in according to the patient ID. For example, if the Na level feature of the second sample of a patient is missing, the present invention can use the average value of the Na level of other samples of the patient as the filling value. However, if the Na level feature in all samples of a patient is missing, in this case, the present invention believes that the median of the Na level of all samples of all patients in the data set of the present invention is the most representative and can be used as a filling value for filling. After processing, the data set of the present invention has 2119 samples, each with 9 features. That is, the shape of each sample is [9, 1], 9 is the number of features and the sequence length, and 1 is the dimension of the feature.
[0036] Step 2, label setting part. Each sample has two labels, S1_IgG and N_IgG antibody levels. In the present example, if the patient's two antibody levels are greater than 10,000, they can be considered as strongly positive, and less than 10,000 as weakly positive. Therefore, the present invention marks the two antibody levels greater than 10,000 as 1 and less than 10,000 as 0, as two-category labels.
[0037] Step 3: Seq2Seq model construction with linear attention mechanism. The present invention first constructs Seq2Seq_LA, where both the encoder and decoder are LSTM models with 40 neurons. The initial hidden state of the encoder is set to a vector of all zeros, and the initial hidden state of the decoder is set to the last hidden state of the encoder. And its alignment function is set to , i.e. linear attention. The sequence length of the encoder is 9, and the dimension of each input feature is 1. The sequence length of the decoder is 1, because it predicts the category of one antibody level, and its input is the context vector The shape of its output is [1,40]. Then this output is input into a neural network with 2 output neurons, and the output shape is [1, 2]. Then add a softmax layer, which is a binary classification problem.
[0038] Step 4: Train the Seq2Seq model with attention mechanism. The present invention divides the 2119 data sets into 7:3 as training set and test set. The present invention first uses the Seq2Seq_LA model to train on the samples of the training set to achieve better results. The loss function used is MSELoss, the optimizer used is adam, and the learning rate is 0.01.
[0039] Step 5: Extract the intermediate state data of the model. Input the training samples into the trained Seq2Seq_LA model one by one to obtain the hidden states and context vectors in the model corresponding to each sample. The shape of each input sample is [9, 1], and the shape of all 9 hidden states of the Encoder is [9, 40]. The initial hidden state of the Decoder ( ) has a shape of [1, 40]. The context vector ( ) has a shape of [1, 40].
[0040] Step 6: Generalized additive model fitting and substitution. The present invention uses the formula of the generalized additive model to fit the attention solution process, and the fitting formula is as follows: Update model parameters during fitting The algorithm used is the back propagation algorithm. The artificially set parameters for fitting are: number of training times = 5, loss function is Adam, learning rate is 0.01, K = 3, =3.7, =0.2. That is, the fitted generalized additive model replaces the linear attention mechanism of the Seq2Seq model with the linear attention mechanism, and is used for the classification prediction of the positive stage of the S1_IgG antibody level and the N_IgG antibody level of the new coronavirus in the blood test sample to be tested.
[0041] The following are preliminary experimental results: In the problem of binary classification of SI_IgG antibody levels, the present invention selects 5 traditional models, a Seq2Seq model with a single nonlinear attention mechanism (Seq2Seq_NA, whose alignment function uses the hyperbolic tangent activation function tanh), a Seq2Seq model with a single linear attention mechanism (Seq2Seq_LA), and compares them with the model of the present invention (Antiseq2Seq). Among them, the GAM of the 5 traditional models is a generalized additive model, LSTM_FFA is an LSTM model with a feedforward neural network as the attention alignment function, LightGBM is a lightweight gradient boosting machine, CatBoost is Categorical Boosting, and AdamBoost is an adaptive boosting algorithm.
[0042] 1. In the binary classification task of S1_IgG antibody level, the performance comparison table of the model of the present invention and other models is shown in Table 1: Table 1 See Table 1 and Figure 3 , 4 It can be found that the model constructed by the method of the present invention is better than the traditional model in ACC (accuracy), Recall, Precision, and F1-Score. In addition, the AUC (area under the ROC curve) and AP (average precision) values of the model constructed by the method of the present invention are higher than those of the previous model, indicating that the robustness of the model constructed by the method of the present invention is better than that of other models.
[0043] In addition, in the S1_IgG level classification prediction task, the ACC of AntiSeq2Seq is 1.46% higher than Seq2Seq_LA and 0.84% higher than Seq2Seq_NA. The only structural difference between AntiSeq2Seq and Seq2Seq_LA is their context vector solution process, while the parameters of the Encoder and Decoder of AntiSeq2Seq and Seq2Seq_LA are the same. This is a typical ablation experiment because the only difference between the two models is the process of solving the context vector. Therefore, the present invention can infer that semi-linear attention can effectively capture nonlinear information that linear attention may ignore, thereby helping to improve its prediction performance.
[0044] In addition, after comparing and analyzing the confusion matrix, ROC curve and PR curve between AntiSeq2Seq and Seq2Seq_NA, the present invention finds that AntiSeq2Seq always has higher prediction performance. The only difference between Seq2Seq_NA and AntiSeq2Seq is also the context vector solution process. This ablation experiment shows that AntiSeq2Seq can capture linear information that Seq2Seq_NA may find difficult to capture. Therefore, AntiSeq2Seq produces better results. Specifically, semi-linear attention can learn linear information that is difficult to handle by nonlinear attention.
[0045] 2. The effect of the model of the present invention on the task of classifying N_IgG antibody levels is shown in Table 2: Table 2 See also Figure 5 , 6 It can be found that the model constructed by the method of the present invention is higher than the traditional model in ACC, Recall, Precision, and F1-Score. In addition, the AUC and AP values of the model constructed by the method of the present invention are higher than those of the previous model, indicating that the robustness of the model constructed by the method of the present invention is better than that of other models.
[0046] In the prediction of N IgG positive stage, the ACC of AntiSeq2Seq is 3.48% higher than that of Seq2Seq_LA. In the prediction of N IgG positive stage, the ACC of AntiSeq2Seq is 2.86% higher than that of Seq2Seq_NA.
[0047] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.
Claims
1. A method for classifying the positive stages of COVID-19 S1_IgG and N_IgG antibody levels, characterized in that: include: Binary classification labels are set for the S1_IgG antibody level and N_IgG antibody level of the blood test samples in the blood test sample data set; Construct a Seq2Seq model with a linear attention mechanism, and train the Seq2Seq model with a linear attention mechanism based on a blood test sample dataset to obtain a trained Seq2Seq model with a linear attention mechanism; Input the blood test sample data set into the trained Seq2Seq model with a linear attention mechanism to obtain the intermediate state data corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism; Based on the corresponding intermediate state data of each blood test sample in the trained Seq2Seq model with a linear attention mechanism, the residual of the generalized additive model fitting is constructed, and the SCAD penalty term is introduced to obtain the fitted generalized additive model with a nonlinear smooth function to replace the linear attention mechanism of the Seq2Seq model with a linear attention mechanism, which is used for the classification prediction of the positive stage of the S1_IgG antibody level and N_IgG antibody level of the new coronavirus in the blood test samples to be tested.
2. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 1, characterized in that: The blood test sample data set consists of blood test samples from multiple patients, the number of blood test samples from each patient is greater than 1, and there are N blood test samples in total. Each blood test sample has two corresponding labels, S1_IgG antibody level and N_IgG antibody level, and m features, and the m features include multiple serological indicator features and demographic indicator features.
3. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 2, characterized in that: Before setting binary classification labels for the new coronavirus S1_IgG antibody levels and N_IgG antibody levels of the blood test samples in the blood test sample data set, the blood test sample data set needs to be preprocessed, that is, for missing features in a blood test sample, the average value of the corresponding features of other blood test samples belonging to the same patient is used as the filling value; if the corresponding features in the blood test samples belonging to the same patient are all missing, the median of the corresponding features of all other blood test samples in the blood test sample data set is used as the filling value.
4. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 1, characterized in that: The method of setting binary classification labels for the new coronavirus S1_IgG antibody level and the N_IgG antibody level of the blood test samples in the blood test sample data set is: setting an antibody level threshold, marking the new coronavirus S1_IgG antibody level / N_IgG antibody level of the blood test samples in the blood test sample data set that is greater than or equal to the antibody level threshold as 1, and marking the new coronavirus S1_IgG antibody level / N_IgG antibody level of the blood test samples in the blood test sample data set that is less than the antibody level threshold as 0, and using this as the binary classification label.
5. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 1, characterized in that: The Seq2Seq model with linear attention mechanism adopts an encoder-decoder structure, where represents the i-th hidden state of the encoder; represents the initial hidden state of the decoder, initialized with the last hidden state of the encoder; represents the energy score of the i-th hidden state of the encoder; is the alignment function; represents the attention weight of the i-th hidden state of the encoder, 1≤i≤T, T is the number of features; represents the context vector.
6. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 5, characterized in that: The intermediate state data corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism, that is, the hidden states of the encoder corresponding to each blood test sample in the trained Seq2Seq model with a linear attention mechanism , the initial hidden state of the decoder and context vector .
7. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 6, characterized in that: The residual error of the generalized additive model fitting is constructed, and the SCAD penalty term is introduced to obtain the generalized additive model with a nonlinear smooth function after fitting. The specific implementation is as follows: (1) Construct the residuals of the generalized additive model fitting: The residual of the generalized additive model to fit the attention mechanism is initially expressed as follows: in, The T represents transpose; represents a nonlinear smooth function, is the dot product of the i-th hidden state of the encoder and the initial hidden state of the decoder; the above formula means that each nonlinear smooth function of the generalized additive model fits a corresponding linear attention weight solution process; the above formula is further simplified to: Summarizing and expanding the above formula, the final fitting residual is summarized as follows: in, represents the L2 norm; is the i-th hidden state of the encoder corresponding to the n-th blood test sample in the blood test sample dataset; is the initial hidden state of the decoder corresponding to the nth blood test sample in the blood test sample dataset; is the context vector corresponding to the nth blood test sample in the blood test sample dataset; N is the number of blood test samples in the blood test sample dataset; is a nonlinear smooth function whose input is a scalar; b is all the learnable parameters in the nonlinear smooth function ; The specific meaning is that by updating the parameters Minimize the residual error; (2) For the residuals of the generalized additive model fitting, the SCAD penalty term is introduced: The Sigmoid function is used to limit the value of the input nonlinear smooth function to between 0 and 1, and the SCAD penalty term is introduced. The formula is as follows: in, is the SCAD penalty term, which contains and is the parameter to be set. Represents the absolute value of the input variable x.
8. The method for classifying the positive stages of the novel coronavirus S1_IgG and N_IgG antibody levels according to claim 7, characterized in that: Nonlinear smoothing function It is expressed as follows: in, is a learnable parameter; is the basis function; K is a parameter to be set, indicating the number of basis functions; the basis function in the nonlinear smooth function is: in, It is the parameter to be set.
