HIV (human immunodeficiency virus) supplementary nucleic acid quantitative detection method and system

The nonlinear relationship between the independent variables and dependent variables of HIV infection is analyzed through the gradient boosting tree model and the LightGBM model, which solves the problems of false negatives and uncertain results in HIV diagnosis, and improves diagnostic accuracy and resource utilization efficiency.

CN118629490APending Publication Date: 2024-09-10贵州省疾病预防控制中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410758968.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In current HIV diagnosis, positive reports of immunoblot tests contain false negative or uncertain results, which affects the accuracy of the test. Especially in the window period, terminal stage and when the immune system is compromised, it is difficult to accurately predict HIV infection.

Method used

Using Gradient Boosting Trees and LightGBM models, it improves the model's prediction ability by iteratively adding decision trees, analyzes the nonlinear relationship between multiple independent variables and dependent variables, outputs prediction probabilities, and provides personalized detection strategies. guide.

Benefits of technology

It improves the diagnostic accuracy of HIV infection status, reduces misdiagnosis and missed diagnosis, provides personalized testing strategies, optimizes the allocation of medical resources, saves testing costs, and ensures timely diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629490A
    Figure CN118629490A
Patent Text Reader

Abstract

The invention discloses a quantitative detection method and system for HIV (human immunodeficiency virus) supplementary nucleic acid. The invention relates to the technical field of nucleic acid detection. Comprising a regression function F (X), and setting a dependent variable y (NAT positive / negative) as a predicted value; initializing parameters of the LightGBM model, wherein the parameters comprise the learning rate, the depth of a tree and the number of leaf nodes; the LightGBM model can be regarded as an addition model and is composed of a plurality of base learners (decision trees). And training the LightGBM model by using the training set Dtrain. In a training process, a verification set Dval is used to adjust parameters to prevent overfitting. During the period, the optimal learning rate, the tree depth and the leaf node number of the LightGBM model are selected by using a cross validation method. And evaluating the recall rate and the accuracy rate by using the test set Dtest. According to the method, iterative learning and prediction are carried out by using the LightGBM model, and the scheme can capture a complex nonlinear relationship between the independent variable and the NAT positive / negative result. Therefore, the HIV infection state of the patient can be predicted more accurately, and the possibility of misdiagnosis and missed diagnosis is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nucleic acid detection, specifically to the technical field of HIV confirmation test and its application analysis, and especially to a quantitative detection method and system for HIV supplementary nucleic acid. Background Art

[0002] In the current HIV diagnosis process, a positive report from Western Blot (WB) is considered the key basis for confirming HIV infection. However, due to the complexity of multiple biological factors, HIV antibody testing sometimes gives false negative or uncertain results. These inaccurate results are inferred as:

[0003] (1) If the sampling time coincides with the window period of HIV infection, HIV antibody infection markers in the serum may not have fully manifested at this time;

[0004] (2) The errors that may exist in the operation of WB test, coupled with the fact that the interpretation of the results is highly subjective, may also affect the accuracy of the test;

[0005] (3) In the terminal stage of AIDS, the body's immune system is severely damaged by the virus, which may cause the antibody level to drop sharply or even disappear, thus affecting the accuracy of the test results.

[0006] Through univariate analysis, gender, age, marital status, education, occupation, WB conclusion, presence of bands, and presence of specific gp41 and p24 bands were all risk factors for positive nucleic acid amplification test (NAT). However, further multivariate conditional logistic regression analysis identified six major risk factors: gender, age, WB conclusion, presence of bands, and presence of gp41 and p24 bands.

[0007] In the binary variable analysis, the appearance of bands in the WB test increased the probability of NAT positivity to 3.286 times that of the absence of bands. This phenomenon is likely to indicate that HIV infection has stimulated the body's immune system response. In particular, the appearance of the p24 band has been confirmed by many studies to be a precursor to HIV infection. P24 is a type of band that appears earlier after HIV infection, so it has important reference value in the early diagnosis of HIV infection. However, some research reports have pointed out that when only the p24 band appears, the detection rate of viral load is relatively low (only 10%), and subsequent follow-up results are mostly uncertain or negative.

[0008] To this end, the present invention provides a method and system for quantitatively detecting HIV supplementary nucleic acid. Summary of the invention

[0009] In view of this, the embodiments of the present invention hope to provide a detection method and system for the quantitative detection of HIV supplementary nucleic acid to solve or alleviate the technical problems existing in the prior art, namely, how to predict the binary variable analysis of HIV, and provide strategic guidance for the quantitative detection of HIV supplementary nucleic acid, and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:

[0010] First, the quantitative detection method of HIV supplementary nucleic acid:

[0011] 1. Overview:

[0012] This solution aims to solve the above technical problems. Because the NAT result is positive or negative, it is a binary classification problem. Therefore, the nonlinear relationship between multiple independent variables and the dependent variable (NAT positive / negative) should be analyzed, and the probability prediction should be output. In essence, it is a solution to a regression problem.

[0013] This solution chooses to build a gradient boosting tree model (Gradient Boosting Trees) and chooses to use the LightGBM model to iteratively add new decision trees to correct the errors of the previous model.

[0014] (II) Technical solution

[0015] 2.1 Step S1, Data Engineering:

[0016] A data set D containing multiple independent variables x (such as gender, age, WB conclusion, and whether bands appear) and a dependent variable y (NAT positive / negative) is collected.

[0017] The data set D can also be preprocessed, including processing missing values, outliers, and normalization.

[0018] Then the data is divided into training set D train , test set D test , validation set D val . Use 70% of the data as the training set D train , 15% as validation set D val to adjust the model parameters, and the remaining 15% is used as the test set D test To evaluate the model performance.

[0019] 2.1.1 Step S100, Dataset D:

[0020] D=(x1,y1),(x2,y2),...,(x n ,y n );

[0021] Among them, x i is the independent variable vector of the ith sample (including gender, age and WB conclusion), yi is the corresponding dependent variable (NAT positive / negative); n is the sample size.

[0022] 2.1.2 Step S101, data cleaning and preprocessing:

[0023] Data Standardization:

[0024]

[0025] Among them, z i is the standardized value, x i is the original value, μ is the mean, and σ is the standard deviation.

[0026] Data normalization:

[0027]

[0028] where x i ' is the normalized value, x i is the original value, min(X) and max(X) are the minimum and maximum values ​​in the data set D, respectively.

[0029] 2.2 Step S2, Feature Engineering:

[0030] For data set D, the feature set X (gender and presence of bands) that is strongly correlated with the NAT positive / negative results is selected and one-hot encoding is performed.

[0031] For all categorical features C in dataset D, there are n categories (c1, c2, ..., c n ), for a specific sample, if its category is c i , then after one-hot encoding, a vector of length n will be obtained in:

[0032]

[0033] Among them, v j Representation vector The j-th element of .

[0034] For example, for the feature "gender", it has two possible values: male and female. After one-hot encoding, this feature will be converted into two new features: "gender_male" and "gender_female". For samples with the original feature value of "male", the new feature "gender_male" will be set to 1 and "gender_female" will be set to 0; vice versa.

[0035] 2.3 Step S3, read the LightGBM model:

[0036] It includes a regression function F(X), setting the dependent variable y (NAT positive / negative) as the predicted value;

[0037] Initialize the parameters of the LightGBM model, including the learning rate, tree depth, and number of leaf nodes.

[0038] 2.3.1 Step S300, base learner mechanism:

[0039] The LightGBM model can be regarded as an additive model, which consists of multiple base learners (decision trees). For M decision trees, then:

[0040]

[0041] Among them, T m (X) represents the output of the mth decision tree.

[0042] 2.3.2 Step S301, initialization parameters, including:

[0043] Learning rate η (Learning Rate): It controls the contribution of each decision tree to the final model.

[0044] Tree depth MD (Max Depth): It limits the maximum depth of each decision tree. Deeper trees may be more complex and able to capture more data details, but they are also more prone to overfitting.

[0045] Number of Leaves (NL): It determines the maximum number of leaf nodes in each decision tree. Increasing the number of leaf nodes can increase the complexity of the model.

[0046] 2.4 Model training:

[0047] Using the training set D train Train the LightGBM model. During the training process, use the validation set D val To adjust the parameters to prevent overfitting. During this period, the cross-validation method was used to select the optimal learning rate, tree depth and number of leaf nodes for the LightGBM model. The test set D test Evaluate recall and precision.

[0048] 2.4.1 Based on cross validation method:

[0049] In model selection, cross-validation divides the dataset D into k subsets of equal size, and then performs k training and validation. Each time, one subset is selected as the validation set, and the remaining k-1 subsets are used as training sets. This process is repeated k times, and each subset is used as a validation set. The performance of the model is the average of the k validation results. The cross-validation method is used to select the optimal learning rate η, tree depth MD, and number of leaf nodes NL for the LightGBM model.

[0050] 2.4.2 Evaluation mechanism during training:

[0051] Recall: measures the model's ability to correctly identify positive samples:

[0052]

[0053] Among them, TP is a true positive example (actually positive and predicted as positive), and FN is a false negative example (actually positive but predicted as negative).

[0054] Precision:

[0055]

[0056] Among them, FP is a false positive (actually negative but predicted as positive).

[0057] 2.4.3 Training process based on Gradient Boosting Tree (GBT):

[0058] 2.4.3.1 Initialization:

[0059] Set an initial weak learner F0(x), which is a constant that minimizes the loss function:

[0060]

[0061] Among them, L(y i ,γ) is the loss function, and γ is the output of the weak learner.

[0062] 2.4.3.2 For each iteration (m=1,2,...,M):

[0063] a. Calculate the negative gradient (residual) r mi :

[0064] For each sample i, calculate the loss function with respect to the current model F m-1 The negative gradient (also called pseudo residual) of (xi):

[0065]

[0066] Represents the gradient of the loss function for each sample under the current model.

[0067] b. Fitting negative gradient:

[0068] Use the decision tree algorithm to fit the negative gradient r calculated above mi (as the target variable), and get the mth decision tree T m (x). This tree partitions the residuals in a way that minimizes the sum of squares of the residuals.

[0069] c. Calculate the optimal output value of the leaf node:

[0070] For T m For each leaf node j of (x), find the output value γ that minimizes the loss function jm :

[0071]

[0072] Among them, R jm Represents the set of samples divided into the jth leaf node.

[0073] d. Update the model:

[0074] Add the newly generated decision tree and its leaf node output values ​​to the model and update the model to:

[0075]

[0076] Among them, J m is the number of leaf nodes in the mth tree, and I(·) is an indicator function that takes 1 when the condition is true and 0 otherwise.

[0077] e. Check convergence:

[0078] If the stopping condition is met (such as reaching the preset maximum number of iterations, or the improvement of the loss function is less than a preset threshold), the iteration is stopped.

[0079] After M rounds of iterations, the final model is F M (x). This model is a weighted sum of all generated decision trees, with the weights determined by the leaf node output values ​​of each tree.

[0080] 2.5 Step S4, output probability prediction and strategy guidance:

[0081] Use the trained LightGBM model F M(x) Predict new samples, input the current independent variable X', and output the predicted dependent variable y' (the probability of NAT positive / negative). Set a probability threshold T. When the probability of predicted positive exceeds the threshold, the system recommends further nucleic acid quantitative testing to confirm the infection status: y' = F M (X');

[0082] Here, y' is a probability value between 0 and 1.

[0083] The probability threshold T is used to decide whether to recommend further nucleic acid quantitative testing. The strategy guidance method is:

[0084] If y'>T, that is, the probability of predicted positive exceeds the set threshold, the system recommends further nucleic acid quantitative testing to confirm the infection status.

[0085] If y'≤T, that is, the probability of being predicted to be positive does not exceed the set threshold, the system recommends continued observation or taking other appropriate measures.

[0086] (III) Mechanism for solving technical problems:

[0087] LightGBM improves the prediction ability of the model by iteratively adding new decision trees. Each new tree tries to predict the residual (the difference between the true value and the current model prediction) of all previous trees. In each iteration, the model selects the feature with the largest information gain to split, thereby generating a new decision tree. The model is able to gradually learn complex patterns in the data. A histogram-based algorithm is used to optimize the generation process of decision trees, which increases training speed and reduces memory usage. After multiple rounds of iterations, the LightGBM model combines the prediction results of multiple decision trees to obtain the final prediction probability. This probability represents the possibility that the sample belongs to a certain category.

[0088] Second, HIV supplements the nucleic acid quantitative detection system:

[0089] like Figure 3 As shown, the system includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the detection method as described above. At the same time, the processor feeds back the detection results to the display and displays corresponding strategic guidance suggestions.

[0090] Compared with the prior art, the present invention has the following beneficial effects:

[0091] 1. Improve diagnostic accuracy: The present invention uses the LightGBM model for iterative learning and prediction, which can capture the complex nonlinear relationship between independent variables and NAT positive / negative results. This helps to more accurately predict the HIV infection status of patients and reduce the possibility of misdiagnosis and missed diagnosis.

[0092] 2. Personalized strategy guidance: Based on the predicted probability of the model, the present invention can provide a personalized testing strategy for each patient. When the probability of predicted positive exceeds the set threshold, the system will recommend further nucleic acid quantitative testing to ensure that the infection status is confirmed in a timely manner. This strategy avoids unnecessary testing and provides timely diagnosis when necessary.

[0093] 3. Optimal utilization of resources: By setting a reasonable probability threshold, the present invention can optimize the allocation of medical resources. Only when the predicted positive probability is high, further nucleic acid quantitative testing is recommended, which helps save testing resources and costs, while ensuring that patients in need receive timely attention and treatment.

[0094] 4. Powerful data processing capabilities: The present invention uses data engineering and feature engineering techniques to process large data sets containing multiple independent variables. In addition, through data cleaning and preprocessing, as well as unique hot encoding and other techniques, the input quality of the model is improved, further enhancing the accuracy of the prediction.

[0095] 5. Flexibility and scalability: The LightGBM model of the present invention has good flexibility and scalability, and can be adjusted and optimized according to different data sets and requirements. This means that the solution can adapt to different application scenarios and patient groups, providing comprehensive support for HIV testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0097] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0098] Figure 2 It is a flowchart of the training method of the LightGBM model of the present invention;

[0099] Figure 3 It is a schematic diagram of the system composition of the present invention;

[0100] Figure 4This is a schematic diagram of a C++ execution program of step S1 of the present invention;

[0101] Figure 5 This is a schematic diagram of the C++ execution program of step S2 of the present invention;

[0102] Figure 6 This is a schematic diagram of a C++ framework program of step S3 of the present invention;

[0103] Figure 7 This is a schematic diagram of a C++ training program according to the second embodiment of the present invention;

[0104] Figure 8 This is a schematic diagram of the C++ execution program of step S4 of the present invention. DETAILED DESCRIPTION

[0105] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;

[0106] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0107] Embodiment 1: Figure 1 As shown, this embodiment discloses a method for quantitatively detecting HIV supplementary nucleic acid, which includes the following steps S1 to S4.

[0108] In this embodiment, regarding step S1, data engineering: collect a data set D containing multiple independent variables x (such as gender, age, WB conclusion and whether a band appears) and a dependent variable y (NAT positive / negative). The data set D can also be preprocessed, including processing missing values, outliers, and normalization.

[0109] Then the data is divided into training set D train , test set D test , validation set D val . Use 70% of the data as the training set D train , 15% as validation set D val to adjust the model parameters, and the remaining 15% is used as the test set D test To evaluate the model performance.

[0110] Specifically, in step S100, data set D:

[0111] D=(x1,y1),(x2,y2),...,(x n ,y n );

[0112] Among them, x i is the independent variable vector of the ith sample (including gender, age and WB conclusion), y i is the corresponding dependent variable (NAT positive / negative); n is the sample size.

[0113] Specifically, step S101, data cleaning and preprocessing, includes:

[0114] 1) Data standardization: helps the model converge faster during training and improves the model’s predictive performance:

[0115]

[0116] Among them, z i is the standardized value, x i is the original value, μ is the mean, and σ is the standard deviation.

[0117] 2) Data normalization: Scale the data to a specified range (between 0 and 1):

[0118]

[0119] where x i ' is the normalized value, x i is the original value, min(X) and max(X) are the minimum and maximum values ​​in the data set D, respectively.

[0120] It is understandable that through data preprocessing, noise and outliers in the data can be eliminated, thereby improving the predictive performance of the model. Processing such as normalization and standardization can also make the model more stable during training and reduce the risk of overfitting. The standardized data has zero mean and unit variance, which allows the model to converge to the optimal solution faster during training, thereby saving training time. By reasonably dividing the data (training set, validation set, test set), it is ensured that the model can maintain good predictive performance on unseen data.

[0121] Furthermore, the C++ execution program of the above step S1 is as follows Figure 4As shown, the principle is that the Sample structure represents each sample, which contains features (independent variables) and labels (dependent variables). The standardize function calculates the mean and standard deviation of each feature, and uses these statistics to transform the feature values ​​so that their mean is 0 and their standard deviation is 1. The normalize function calculates the minimum and maximum values ​​of each feature and uses these values ​​to scale the features to between 0 and 1. The split_dataset function first shuffles the data and then divides the data into three subsets according to the specified ratio (70% training, 15% validation, 15% testing). This ensures that the model does not see the data in the validation or test set during training, so that the performance of the model can be more accurately evaluated.

[0122] In this embodiment, regarding step S2, feature engineering: its main purpose is to extract and optimize features from the original data to the maximum extent for use by the model. In this technical solution, feature engineering mainly includes the following steps:

[0123] First, feature selection is performed on the dataset D. The purpose of this step is to filter out the feature set X that is strongly correlated with the positive / negative results of NAT (nucleic acid amplification test). In this example, the two features of gender and the presence of bands are selected. These two features are selected because they show strong statistical significance in their association with NAT results, which means that they are important for predicting NAT results.

[0124] Next, for the categorical features in the selected feature set X, one-hot encoding is performed to convert the categorical variables (also called nominal variables or qualitative variables) into a format that can be used by machine learning algorithms. Specifically, one-hot encoding converts each categorical feature into a binary vector in which only one element is 1 (indicating that the category is on) and the rest are 0 (indicating that all other categories are off).

[0125] Specifically, for all classification features C in the data set D, there are n categories (c1, c2, ..., c n ), for a specific sample, if its category is c i , then after one-hot encoding, a vector of length n will be obtained in:

[0126]

[0127] Among them, v j Representation vector The j-th element of .

[0128] For example, for the feature "gender", it has two possible values: male and female. After one-hot encoding, this feature will be converted into two new features: "gender_male" and "gender_female". For samples with the original feature value of "male", the new feature "gender_male" will be set to 1 and "gender_female" will be set to 0; vice versa. Similarly, for the feature of whether stripes appear (which has two possible categories: yes and no), we will also perform the same one-hot encoding process to generate two new binary features: "whether stripes appear_yes" and "whether stripes appear_no".

[0129] The benefit of one-hot encoding is that it solves two problems that classifiers may encounter when processing data: first, machine learning algorithms require that input features be numerical, and one-hot encoding can convert classification features into numerical features; second, one-hot encoding can expand the feature space, making it easier for the model to capture the relationship between different categories.

[0130] It is understandable that through the above feature engineering steps, an optimized feature set is obtained, which is more suitable for subsequent machine learning model training, thereby improving the prediction accuracy of HIV NAT positive / negative results. This improvement in accuracy helps to develop more effective HIV supplementary nucleic acid quantification strategies and provide more reliable guidance for clinical practice.

[0131] Further, the C++ execution program of step S2 is as follows Figure 5 As shown in the figure, the principle is that the Record structure represents a record in the data set, including gender, whether stripes appear, and NAT results. The one_hot_encode function accepts a feature value and a list of possible values ​​for the feature, and then returns a map, where the key is the possible value and the value is the corresponding one-hot encoding (1 for the current value, 0 for not). In the main program, a data set and some possible values ​​of the features are first defined. Then each record in the data set is one-hot encoded, and the encoded results are stored in two vectors (one for gender and one for whether stripes appear).

[0132] In this embodiment, regarding step S3, the LightGBM model is read: including a regression function F(X), setting the dependent variable y (NAT positive / negative) as the predicted value; initializing the parameters of the LightGBM model, including the learning rate, the depth of the tree, and the number of leaf nodes.

[0133] Specifically, step S300, base learner mechanism: This function will be used to predict the positive / negative results of NAT (nucleic acid amplification test). In the LightGBM model, F(X) is actually an additive model, which is composed of the outputs of multiple base learners (here, decision trees). Specifically, if there are M decision trees, then F(X) can be expressed as the sum of the outputs of these decision trees:

[0134]

[0135] Among them, T m (X) represents the output of the mth decision tree.

[0136] Specifically, step S301, initializing parameters, includes:

[0137] (1) The learning rate η determines the contribution of each newly added decision tree to the final model prediction results. A lower learning rate may cause the model to learn more slowly, but it usually produces more robust results because it reduces the overall impact of each tree on the model, allowing more trees to be added to the model for more refined adjustments.

[0138] (2) Tree depth MD (Max Depth) is another key parameter that limits the maximum depth of the decision tree. The depth of the tree determines the complexity of the model and its ability to capture data details. Deeper trees can dig deeper into the characteristics of the data, but may also lead to overfitting, especially when the data set is small. Therefore, choosing the right tree depth is the key to finding a balance between model complexity and generalization ability.

[0139] (3) The number of leaf nodes NL (Num Leaves) determines the maximum number of leaf nodes for each decision tree. Leaf nodes are the terminal nodes of the decision tree, and they directly correspond to the predicted output of the model. Increasing the number of leaf nodes can increase the complexity of the model, enabling it to fit the data more finely. However, too many leaf nodes may also make the model too complex, thereby reducing its generalization ability.

[0140] Furthermore, the C++ program framework of the model constructed in step S3 is as follows: Figure 6As shown, the principle is that the C API header file of LightGBM is included so that the functions of the LightGBM library can be called. The header files of standard input, output and vector are also included. In the main function, a parameter list param is first defined, which will be passed to the LightGBM model. Among them, learning_rate is the learning rate η, max_depth is the depth of the tree MD, and num_leaves is the number of leaf nodes NL. These parameters are all in string form because the C API of LightGBM accepts parameters in string form. Since the C API of LightGBM requires a character pointer array as a parameter, the param list is converted to the corresponding format. A LightGBM booster is created using the converted parameters and training dataset. If the creation is successful, the model training can continue. After completing the creation and training of the model, the allocated resources need to be released, including the booster, dataset, and parameter key-value pair array.

[0141] In this embodiment, regarding step S4, output probability prediction and strategy guidance: use the trained LightGBM model FM(x) to predict new samples. This model is learned through a large amount of training data in the previous step, and it has learned how to infer the dependent variable y (i.e., the probability of NAT positive / negative) from the input independent variable X. For a new sample, we input its independent variable X' into the model FM(x), and the model will output a predicted value y'. This y' is a probability value between 0 and 1, indicating the probability that the sample is NAT positive.

[0142] Specifically, set a probability threshold: In order to decide whether further nucleic acid quantitative testing is needed for new samples, we set a probability threshold T. This threshold can be adjusted according to actual needs, but it should usually be set based on factors such as model performance, the cost of false positives and false negatives, and available resources.

[0143] Furthermore, based on the predicted probability y' output by the model and the set probability threshold T, we can provide strategy guidance for new samples:

[0144] If y'>T, that is, the probability of being predicted to be positive exceeds the set threshold, the system recommends further nucleic acid quantitative testing to confirm the infection status. This is because when the predicted probability is higher than the threshold, we have enough confidence that the sample may be positive and it is worth conducting a more accurate test.

[0145] If y'≤T, that is, the predicted probability of being positive does not exceed the set threshold, the system recommends continuing observation or taking other appropriate measures. This is because when the predicted probability is lower than or equal to the threshold, we believe that the sample is less likely to be positive and may not need to be immediately tested for nucleic acid quantification.

[0146] It is understandable that by setting a suitable probability threshold, we can screen out the samples most likely to be positive for further nucleic acid quantitative testing, thereby avoiding unnecessary testing of a large number of negative samples and improving the detection efficiency. Since unnecessary testing is reduced, the cost and resource consumption of testing are also reduced. The probability threshold T can be adjusted according to actual conditions to meet different testing needs and resource constraints. For example, when resources are tight, the threshold can be increased to reduce the number of tests; when high sensitivity is required, the threshold can be lowered to capture more positive samples.

[0147] Further, the C++ execution program of step S4 is as follows Figure 8 As shown in the figure, the principle is: use the C API function of LightGBM to initialize the environment and load the pre-trained model from the file. Create an array containing the feature values ​​of the new sample and use the LightGBM API to convert it into a dataset that can be used for prediction. Use the loaded model to predict the new sample dataset to obtain the predicted probability of NAT positivity. Compare the predicted probability with the set threshold, and output strategy recommendations based on the comparison results. If the predicted probability is higher than the threshold, further nucleic acid quantitative testing is recommended; otherwise, it is recommended to continue observation or take other measures. After the prediction is completed, release the allocated resources, including the prediction dataset and model.

[0148] Embodiment 2: Although the LightGBM model is constructed in step S3 of embodiment 1, it still needs to be trained before it can be applied to step S4. This embodiment will further provide its training method, such as Figure 2 As shown, including: using training set D train Train the LightGBM model. During the training process, use the validation set D val To adjust the parameters to prevent overfitting. During this period, the cross-validation method was used to select the optimal learning rate, tree depth and number of leaf nodes for the LightGBM model. The test set D test Evaluate recall and precision.

[0149] Specifically, use the training set DtrainTo train the LightGBM model, we use the validation set D. In this process, the model learns the regularities and patterns in the data, so that it can make predictions on new, unseen data. However, using only the training set to train the model may lead to overfitting, that is, the model performs well on the training data but poorly on new data. To prevent overfitting, we use the validation set D. val To adjust the parameters of the model. Based on the performance of the validation set, we can adjust the learning rate η, the tree depth MD, and the number of leaf nodes NL to find the parameter settings that perform well on both the training set and the validation set. Finally, we use the test set D test To evaluate the performance of the model. The test set is data independent of the training set and the validation set, and is used to evaluate the performance of the model on unseen data. We mainly focus on two indicators: recall and precision. Recall measures the ability of the model to correctly identify positive samples, while precision measures the proportion of instances predicted by the model to be positive samples that are actually positive samples.

[0150] Specifically, cross-validation divides the dataset D into k subsets of equal size, and then performs k training and validation. Each time, one subset is selected as the validation set, and the remaining k-1 subsets are used as the training set. This process is repeated k times, and each subset is used as a validation set. The performance of the model is the average of the k validation results. The cross-validation method is used to select the optimal learning rate η, tree depth MD, and number of leaf nodes NL for the LightGBM model.

[0151] Specifically, record the following two evaluation data to prevent the model from overfitting:

[0152] (1) Recall: measures the model’s ability to correctly identify positive samples:

[0153]

[0154] Among them, TP is a true positive example (actually positive and predicted as positive), and FN is a false negative example (actually positive but predicted as negative).

[0155] (2) Precision:

[0156]

[0157] Among them, FP is a false positive (actually negative but predicted as positive).

[0158] In this embodiment, the training process based on Gradient Boosting Tree (GBT) is as follows:

[0159] First, initialize and set an initial weak learner F0(x), which is a constant that minimizes the loss function:

[0160]

[0161] Among them, L(y i ,γ) is the loss function, and γ is the output of the weak learner.

[0162] Then for each iteration (m=1,2,...,M), perform the following steps:

[0163] a. Calculate the negative gradient (residual) r mi :

[0164] For each sample i, calculate the loss function with respect to the current model F m-1 The negative gradient (also called pseudo residual) of (xi):

[0165]

[0166] Represents the gradient of the loss function for each sample under the current model.

[0167] b. Fitting negative gradient:

[0168] Use the decision tree algorithm to fit the negative gradient r calculated above mi (as the target variable), and get the mth decision tree T m (x). This tree partitions the residuals in a way that minimizes the sum of squares of the residuals.

[0169] c. Calculate the optimal output value of the leaf node:

[0170] For T m For each leaf node j of (x), find the output value γ that minimizes the loss function jm :

[0171]

[0172] Among them, R jm Represents the set of samples divided into the jth leaf node.

[0173] d. Update the model:

[0174] Add the newly generated decision tree and its leaf node output values ​​to the model and update the model to:

[0175]

[0176] Among them, J m is the number of leaf nodes in the mth tree, and I(·) is an indicator function that takes 1 when the condition is true and 0 otherwise.

[0177] e. Check convergence:

[0178] If the stopping condition is met (such as reaching the preset maximum number of iterations, or the improvement of the loss function is less than the preset threshold), the iteration stops. After M rounds of iterations, the final model obtained is F M (x). This model is a weighted sum of all generated decision trees, with the weights determined by the leaf node output values ​​of each tree.

[0179] Furthermore, the C++ execution program of the training method of this embodiment is as follows Figure 7 As shown, the principle is: use the training function in the LightGBM library to pass the training data and verification data to the model for training. During the training process, LightGBM will build multiple decision trees through multiple rounds of iterations based on the principle of gradient boosting tree (GBT) and combine them into a strong learner. In each round of iteration, the model calculates the negative gradient of the loss function and builds a new decision tree based on these gradients. The verification data is used to evaluate the performance of the model after each round of iteration and to prevent overfitting. After the training is completed, the test data is used to evaluate the performance of the model. Calculate the two indicators of recall and precision, and output the evaluation results to the console or other media for further analysis and optimization of the model.

[0180] Test example:

[0181] (I) Experimental materials and methods:

[0182] 1.1 Sample Source

[0183] The samples used in this experiment were all from samples submitted for HIV antibody primary screening reactivity in AIDS primary screening laboratories in Anshun City, Liupanshui City and Bijie City, Guizhou Province between December 2019 and July 2022. After screening, we selected plasma samples with negative or uncertain results of Western Blot (WB), excluded WB-positive, serum samples and samples with insufficient sample size, and included a total of 1289 samples for nucleic acid amplification testing (NAT). NAT uses HIV-1RNA quantitative detection reagents, and is judged to be positive when the test result is higher than the detection limit (20cps / ml). This study has been approved by the Ethics Committee of Guizhou Provincial Center for Disease Control and Prevention (No.: W2021-06).

[0184] 1.2 Detection Method

[0185] HIV antibody confirmation:

[0186] Detection reagent: Use the human immunodeficiency virus (HIV1+2) antibody confirmation kit produced by Mikrogen in Germany.

[0187] Detection instrument: The fully automatic immunoblotting instrument of China Oumeng Medical Diagnostics Company was used.

[0188] HIV-1 nucleic acid quantification:

[0189] Detection reagent: The human immunodeficiency virus (type I) nucleic acid detection kit from Roche, USA, was selected.

[0190] Detection instrument: Use the fully automatic nucleic acid detection system of Roche, USA.

[0191] Result determination: This test uses the standard of "above the detection limit is positive" for data analysis.

[0192] 1.3 Statistical analysis methods

[0193] The LightGBM model was used for data analysis in this study. First, the risk factors associated with positive nucleic acid test were screened out by univariate χ2 test, and then the independence of these factors was further analyzed by multivariate unconditional logistic regression. α = 0.05 was set as the test level, and when P < 0.05, the test variable was considered to be statistically different.

[0194] (II) Test results

[0195] 2.1 Basic information of the sample

[0196] A total of 1289 samples were included in the analysis, of which the age group of 31 to 59 years old accounted for the highest proportion, the majority were married with spouses, more than half had a junior high school education or below, and the majority of occupations were farmers and migrant workers. In WB testing, negative samples accounted for 74.32% and uncertain samples accounted for 25.68%. The NAT positive rate was 8.46% and 41.09% in WB negative and uncertain samples, respectively. The χ2 test found that gender, age, marital status, education level, occupation, WB conclusion, whether there were bands, and whether there were gp41 and p24 proteins were significantly associated with positive nucleic acid tests. Further LightGBM regression analysis, after excluding collinearity factors, finally determined that gender, age, occupation, WB conclusion, whether there were bands, and whether there were p24 proteins were independent factors affecting HIV nucleic acid positive results. (See the table below for detailed data).

[0197]

[0198] 2.3 Main characteristics and gender distribution of nucleic acid positive people in WB

[0199] Men accounted for a larger proportion and the proportion of men in the two groups was similar, slightly higher than the proportion of women. Nucleic acid-positive individuals were mainly concentrated in the age group over 31 years old, especially those aged 60 and above. Married individuals with spouses accounted for a large proportion in both groups. Individuals with junior high school education or below accounted for a large proportion in both groups. Farmers and migrant workers accounted for the highest proportion in both groups, as shown in the table below.

[0200]

[0201] 2.4. Comparison among age groups

[0202] In the analysis of age groups, it was found that the probability of NAT positivity increased with the increase in age. The probability of NAT positivity in people aged 60 and above was 7.5 times that of the 18-30 age group. See the table below for details.

[0203] Age Group Number of people NAT positive <18 years old Negative 32(80) 0 uncertain 8(20) 0 18-30 years old Negative 239(81.29) 2(0.84) uncertain 55(18.71) 7(12.73) 31-59 years old Negative 424(73.23) 35(8.25) uncertain 155(26.77) 60(38.71) >=60 years old Negative 263(69.95) 44(16.73) uncertain 113(30.05) 69(61.06)

[0204] (III) Conclusion:

[0205] Through strict sample screening and scientific statistical analysis methods, this trial successfully identified multiple independent risk factors that affect the positive results of HIV nucleic acid tests, providing an important reference for the early diagnosis and prevention and control strategies of HIV infection.

[0206] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

[0207] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0208] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Claims

1. HIV supplementary nucleic acid quantitative detection method, It is characterized in that The steps include: S1, data engineering: collect a dataset D containing multiple independent variables x and dependent variables y; S2, feature engineering: select a feature set X that is relevant to the NAT positive / negative results in the data set D and perform one-hot encoding; S3, read the LightGBM model: including a regression function F(X), set the dependent variable y (NAT positive / negative) as the predicted value; initialize the parameters of the LightGBM model, including the learning rate, tree depth and number of leaf nodes; S4, output probability prediction and strategy guidance: using the trained LightGBM model F M (x) Predict the new sample, input the current independent variable X', and output the predicted dependent variable y'.

2. The detection method according to claim 1, Features: In S1, the independent variable x includes gender, age, WB conclusion and whether a band appears; the dependent variable y includes NAT positive / negative; The data set D is: D = (x 1 ,y 1 ),(x 2 ,y 2 ),...,(x n ,y n ); Among them, x i is the independent variable vector of the i-th sample, y i is the corresponding dependent variable; n is the sample size.

3. The detection method according to claim 1, Features: In S2, for all the classification features C in the data set D, there are n categories (c 1 ,c 2 ,...,c n ), for a specific sample, if its category is c i , then after one-hot encoding, a vector of length n will be obtained 4. The detection method according to claim 1, Features: In S3, the regression function F(X) and the initialization are respectively implemented by the following two steps: S300, base learner mechanism: regarded as an additive model, consisting of multiple base learners; for M decision trees, then: Among them, T m (X) represents the output of the mth decision tree; S301, initialization parameters, including: learning rate η controls the contribution of each decision tree to the final model; tree depth MD limits the maximum depth of each decision tree; leaf node number NL determines the maximum number of leaf nodes of each decision tree.

5. The detection method according to claim 1 or 4, Features: The training method of the LightGBM model constructed by S3 includes: Initialization: Set an initial weak learner F 0 (x): Among them, L(y i ,γ) is the loss function, γ is the output of the weak learner; For each iteration (m=1,2,...,M), execute: a. Calculate the negative gradient r mi :For each sample i, calculate the loss function about the current model F m-1 The negative gradient of (xi) is: b. Fitting negative gradient: Use the decision tree algorithm to fit the negative gradient r calculated above mi , get the mth decision tree T m (x); c. For T m For each leaf node j of (x), find the output value γ that minimizes the loss function jm : Among them, R jm Represents the sample set divided into the jth leaf node; d. Update the model: Among them, J m is the number of leaf nodes in the mth tree, I(·) is the indicator function, which takes 1 when the condition is true and 0 otherwise; e. Check convergence: If the stopping condition is met, stop the iteration; the final model obtained is F M (x).

6. The detection method according to claim 5, Features: During the training process of the LightGBM model, the cross-validation method is used to select the optimal learning rate η, the depth MD of the tree, and the number of leaf nodes NL for the LightGBM model.

7. The detection method according to claim 5, Features: During the training process of the LightGBM model, the recall rate Recall and the precision rate Precision are calculated to prevent the LightGBM model from overfitting.

8. The detection method according to claim 1, Features: In S4, a probability threshold T is included. When the probability of being predicted to be positive exceeds the threshold, the system recommends further nucleic acid quantitative testing to confirm the infection status: y'=F M (X').

9. The detection method according to claim 8, Features: In S4, if y'>T, that is, the probability of being predicted to be positive exceeds the set threshold, the system recommends further nucleic acid quantitative testing to confirm the infection status; If y'≤T, that is, the probability of being predicted to be positive does not exceed the set threshold, the system recommends continued observation.

10. HIV supplementary nucleic acid quantitative detection system, Features: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the detection method according to any one of claims 1 to 9.