CN109722466B - Method for rapidly detecting strain producing carbapenemase by using AI model - Google Patents

Method for rapidly detecting strain producing carbapenemase by using AI model Download PDF

Info

Publication number
CN109722466B
CN109722466B CN201910090138.8A CN201910090138A CN109722466B CN 109722466 B CN109722466 B CN 109722466B CN 201910090138 A CN201910090138 A CN 201910090138A CN 109722466 B CN109722466 B CN 109722466B
Authority
CN
China
Prior art keywords
model
value
training
solution
enzyme
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910090138.8A
Other languages
Chinese (zh)
Other versions
CN109722466A (en
Inventor
孙坚
贾玲
李西明
翁佳林
刘雅红
廖晓萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China Agricultural University
Original Assignee
South China Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China Agricultural University filed Critical South China Agricultural University
Priority to CN201910090138.8A priority Critical patent/CN109722466B/en
Publication of CN109722466A publication Critical patent/CN109722466A/en
Application granted granted Critical
Publication of CN109722466B publication Critical patent/CN109722466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)

Abstract

The invention discloses a method for rapidly detecting strains producing carbapenemase by using an AI model, which comprises the steps of measuring an OD value of a mixed solution by using a bromothymol blue solution, and finally judging whether the strains can produce carbapenemase or not by analyzing the change trend of the OD value of the mixed solution by using the AI model; the method reduces errors by detecting the trend of the OD value of the strain changing along with time; by detecting the OD value of the strain solution, whether the strain produces carbapenemase can be quickly judged in a very short time, so that the time is greatly saved; for the strains which produce enzyme weakly, an AI model is used for analyzing the change of OD values of the strain solution, and the change is judged quickly; the OD value is led into the LSTM model, so that whether the strains can produce enzyme and the strength of the enzyme production capacity can be obtained immediately, the enzyme production positive quantity and the enzyme production negative quantity of the strains in a batch can be visually seen, the enzyme production result is directly led out, the experiment result does not need to be manually recorded, and the method is efficient and convenient.

Description

Method for rapidly detecting strain producing carbapenemase by using AI model
Technical Field
The invention relates to the research field of artificial intelligence and biotechnology, in particular to a method for rapidly detecting strains producing carbapenemase by using an AI model.
Background
Carbapenem drugs are one of the last lines of defense for clinically treating gram-negative bacterial infection at present, particularly for Carbapenemase-producing Enterobacteriaceae (CRE), and in recent years, the drug resistance rate of carbapenem drugs is increased year by year. Therefore, the development of a method capable of accurately and rapidly detecting carbapenemase is of great importance for clinical treatment.
In 2012, Nordmann et al reported that the Carba-NP method detects whether a strain produces carbapenemase by using a color change of a phenol red indicator under different conditions, and the carbapenemase-producing strain generates a carboxyl group when a beta-lactam ring is hydrolyzed, and finally the color of the phenol red indicator changes from red to yellow with the decrease of pH, so as to judge whether the strain produces carbapenemase, and the defects are that: because the color change range of the phenol red from red to yellow is not large enough, some strains which produce weak enzyme cannot well judge whether the carbapenemase is produced. In 2013 j. pires et al reported the Blue-Carba method, i.e. using the wide color change range of bromothymol Blue (pH 6.0-7.6) to change from Blue to yellow, making it easier to judge whether a strain produces carbapenems, with the following disadvantages: the strain which produces enzyme weakly can not be judged well, and the growth time of the strain is required to be 2 hours; jermey Surre et al in 2017 detected the OD value of the corresponding solution at 558nm by using an ultraviolet spectrophotometer, and judged whether the strain produces enzyme or not by the change of the OD value, and the defects are as follows: the ultraviolet spectrophotometer still needs 2 hours to completely detect whether the strain produces the carbapenemase; lisong Shen et al detected carbapenemase-producing strains of Enterobacteriaceae cultured in blood by MALDI-TOF, which is an imipenem hydrolysis test method using Meyer's bacillus as a substrate, and calculated logQ values according to the peak intensities of imipenem and its hydrolysate to distinguish whether the strains produce carbapenemases, which can be used for rapid identification of blood samples and drug sensitive test reports, but 41.7% of the strains of Enterobacteriaceae of NDM-1 subtype were judged to be negative, and thus the sensitivity of the results was not very high.
Disclosure of Invention
The invention mainly aims to overcome the defects of the prior art and provide a method for rapidly detecting strains producing carbapenemase by using an AI model, which can automatically analyze whether the strains produce carbapenemase and the number of strains producing enzyme positive, further rapidly judge whether the strains produce carbapenemase and the strength of the enzyme production capability of the strains, rapidly judge whether some strains producing enzyme weak produce carbapenemase, directly export the experimental results into a computer, and reduce the time for manually recording the experimental results. Solves the problems of insensitivity of artificial naked eye observation on color change and long enzyme production time.
The purpose of the invention is realized by the following technical scheme:
a method for rapidly detecting strains producing carbapenemase by using an AI model comprises the following steps:
preparing solution by using a Blue-Carba method; adding imipenem into bromothymol blue solution, adding ZnSO4 solution, and finally adjusting the pH of the solution to obtain solution;
selecting a wild strain, preparing a bacterial suspension by using PBS liquid: separating and purifying the sample on a Macconkey agar culture medium, then scratching lawn on an LB agar culture medium, culturing for a certain time, and identifying the strain species through MALDI-TOF; scraping a clitocybe into PBS (phosphate buffer solution) by using an inoculating loop, uniformly mixing by vortex, and adjusting the OD (optical density) value of the solution to obtain a bacterial suspension;
mixing the solution and the bacterial suspension; absorbing the solution by using a discharging gun, adding the solution into a 96-well plate, absorbing the bacterial suspension, and uniformly mixing the bacterial suspension and the solution;
detecting the OD value of the mixed solution by using a full-automatic enzyme standard instrument; putting the 96-hole plate of the mixed solution into a full-automatic enzyme standard instrument, setting the temperature, detecting the OD value of the mixed solution, and exporting original data;
selecting an AI model, carrying out model training and verification to obtain an optimal AI model, introducing OD value original data of the mixed solution into the optimal AI model, carrying out LSTM cyclic neuron cyclic calculation, outputting a characteristic vector, and analyzing through a full-connection network to obtain a carbapenemase production result of the strain;
further, the model training and verification are carried out in the following specific processes:
using 80% of data as a learning sample, performing model training, and using 20% of data as verification data;
cross entry is adopted as a loss function in the model training, an Adam gradient descent mode is adopted, and multiple iterations are performed to optimize model parameters by using training data so as to minimize the loss function;
s1, calculation process of LSTM:
the LSTM takes the OD value of each time point as input, the number of the time points is recorded as n, each time point is traversed during the calculation of the LSTM, and the input is independently used for carrying out once cycle calculation; setting the number of LSTM neurons as k; setting t as the current time point;
the LSTM has two transmission states, one CtOne ht(ii) a Current input x of LSTMtAnd h passed by the last statet-1Four states are obtained by splicing calculation:
ft=σ(Wf*[ht-1,xt]+bf),
it=σ(Wi*[ht-1,xt]+bi),
Figure BDA0001963009790000021
ot=σ(Wo*[ht-1,xt]+bo),
wherein f istTo forget gating, itIn order to memorize the gate control,
Figure BDA0001963009790000031
to input data, otTo control the current output; wfTo forget the weight matrix of gating, bfA bias to forget gating; wiFor memory-gated weight matrices, biA bias for memory gating; wcAs a weight matrix of the input data, bcAn offset for the input data; woTo control the weight matrix of the current output, boTo control the bias of the current output; sigma is an activation function;
different states have different weight matrixes W and offsets b, and optimization parameters need to be trained to obtain training parameters; the weight matrix is a matrix of (k +1) × k, and [ ht-1,xt]Multiplying to obtain a vector with the length of k, namely k neurons; wherein h ist-1Is a vector of length k; x is the number oftIs the OD value at the time t; all the weight matrixes and the initial values of the bias are randomly generated based on normal distribution with the mean value of 0 and the variance of 1;
ftto forget gating, the previous state C is for the objectt-1;itFor memory gating, the input is now for the object
Figure BDA0001963009790000032
Then C istUpdating is carried out according to forgetting gating and memorizing gating:
Figure BDA0001963009790000033
otcontrolling the current output while htAccording to otUpdating:
ht=ot*tanh(Ct),
after the LSTM calculation is completed, a full-connection network is used, so that the final output node is z, which indicates whether enzyme is produced or not:
z=Wz*hn+bz
wherein, WzWeight matrix for fully connected networks, bzFor the bias of a fully connected network, hnThe final output of the LSTM;
s2, calculation process of loss function:
cross entry is used as a LOSS function, and is recorded as LOSS, and is calculated as follows:
Figure BDA0001963009790000034
Figure BDA0001963009790000035
wherein c is the sample size; z is a matrix formed by all samples after the calculation in the previous step, each sample is calculated to obtain a vector, the length of the vector is 2, the vector means that enzyme is produced or enzyme is not produced, and the matrix with the size of c x 2 is obtained by c samples; exp is an exponential function with a natural constant e as the base; the softmax function is used for converting the value range of the input value into 0-1 so as to simulate the probability;
Figure BDA0001963009790000036
the predicted value is calculated by softmax and is a matrix of c x 2; y is the true value, which is likewise a matrix of c x 2, and for each sample, there is a vector [1,0 ] if enzyme is produced]If no enzyme is produced, the directed amount is [0,1 ]];yTIs the transpose of matrix y;
Figure BDA0001963009790000037
is an identity matrix;
s3, calculation process of training algorithm:
using a parameter optimization algorithm Adam as a training algorithm, setting parameters as follows: learning rate α, α is 0.001; exponential decay rate beta of first moment estimation1,β10.9; exponential decay rate beta of first moment estimation2,β20.999; the parameter epsilon, epsilon-10 e-8; training time THRESHOLD, THRESHOLD 2000;
the parameter optimization algorithm Adam aims at a loss function, and the loss function takes the whole training parameters as independent variables, namely all weight matrixes and offsets; gradient v is determined for the loss functionθFtt-1);
And if the current training times is t, the parameter optimization algorithm Adam has the following calculation process:
gt=▽θFtt-1),
mt=β1*mt-1+(1-β1)*gt
Figure BDA0001963009790000041
Figure BDA0001963009790000042
Figure BDA0001963009790000043
Figure BDA0001963009790000044
wherein, gtIn order to estimate the first moment of the image,
Figure BDA0001963009790000045
is a second moment estimation; alpha is the learning rate; beta is a1An exponential decay rate estimated for the first moment; beta is a2An exponential decay rate estimated for the second moment; ε is a very small number, which is to prevent division by zero in the implementation; m ist,vtIs an exponentially weighted moving average;
Figure BDA0001963009790000046
correcting the deviation; thetat-1The parameter set is completed by the previous round of training; thetatThe parameter set finished by the training of the round is obtained;
when the training frequency reaches THRESHOLD, the training is finished;
the verification data is verified by adopting a cross verification method through repeated training for multiple times, the average value of verification indexes is taken as the quantitative display of the model efficiency, and the standard deviation of the model accuracy is obtained;
further, the AI model comprises: decision tree model, AdaBoost model, SVM model and LSTM model
Further, the optimal AI model is an LSTM model;
further, the bromothymol blue solution is 0.4%, and the pH value is 6.0;
further, the content of imipenem in the solution is 3 mg/mL; in the solution, Zn2+The concentration is 0.1 mmol/mL; finally, regulating the pH of the solution to be 7.0;
further, the wild strain is one of Escherichia coli, Pseudomonas putida, Klebsiella pneumoniae, Citrobacter freundii, Enterobacter cloacae and Enterobacter mucosae;
further, culturing for a certain time, specifically culturing for 16-24h at 37 ℃;
further, the bacterial suspension is prepared by the following specific steps: scraping a cyclosporine into 500uLPBS liquid by using 10uL inoculating loop, wherein the PH of the PBS liquid is 7.4, uniformly mixing by vortex, and adjusting the OD value of the bacterial suspension to be 1.3OD-1.7OD at the wavelength of 600 nm;
further, the detecting the OD value of the mixed solution specifically comprises: and (3) putting the 96-pore plate added with the mixed solution into a full-automatic enzyme labeling instrument, setting the temperature of the enzyme labeling instrument to be 37 ℃, detecting the OD value of the mixed solution at the wavelengths of 615nm and 720nm respectively every 5 minutes, and leading out the original data of the OD value of the mixed solution, wherein the detection time is 1 h.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. according to the method, the error caused by observing the color change of the solution by naked eyes is greatly reduced by detecting the trend of the OD value of the strain along with the change of time, and the objectivity is higher;
2. according to the invention, whether the strain can produce enzyme and the strength of the enzyme production capability can be obtained immediately by only introducing the OD value into the LSTM model, and the quantity of enzyme production positive quantity and enzyme production negative quantity of the strain in a batch can be visually seen, so that the method is efficient and convenient;
3. according to the invention, the result of whether the strain can produce carbapenemase can be obtained by only detecting the change of OD values at two time points, so that the time can be saved;
4. the invention can visually see the enzyme production positive quantity and the enzyme production negative quantity of the strains in one batch, can directly derive the enzyme production results of the strains in one batch, does not need to manually record the experimental results, and is efficient, convenient and fast;
5. according to the invention, by detecting the change of the OD values at the two time points, the result of whether the weak enzyme-producing strain produces carbapenemase or not can be quickly obtained.
Drawings
FIG. 1 is a flow chart of a method for rapid detection of carbapenemase-producing strains using AI model according to the present invention;
FIG. 2 is a diagram illustrating test results of a decision tree model according to an embodiment of the present invention;
FIG. 3 is a test result diagram of an AdaBoost model in an embodiment of the invention;
FIG. 4 is a graph of the test results of an SVM model according to the embodiment of the present invention;
FIG. 5 is a graph showing the results of the test of the LSTM model in the embodiment of the present invention;
FIG. 6 is a graph comparing accuracy and standard deviation for four mix in the described embodiment of the invention;
FIG. 7 is a diagram of the LSTM model architecture in the embodiment of the present invention;
FIG. 8 is a LSTM training graph in accordance with an embodiment of the present invention;
FIG. 9 is a schematic view of 10-fold cross validation in an embodiment of the present invention;
FIG. 10 is a diagram of 8 sets of time point training processes in accordance with an embodiment of the present invention;
FIG. 11 is a graph comparing the accuracy of training results for 8 time points according to the embodiment of the present invention;
FIG. 12 is a graph showing the trend of OD values of the LSTM-analyzed strain with time in the examples of the present invention;
FIG. 13 is a graph showing the results of analyzing OD values of strains by the LSTM model in the examples of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
Example (b):
a method for rapidly detecting carbapenemase-producing strains by using an AI model, as shown in fig. 1, comprising the steps of:
the first step is as follows: preparing a solutionA solution:
using the Blue-Carba method: adding imipenem into 0.4% bromothymol blue solution (pH 6.0) to make final drug content of imipenem in the solution 3mg/mL, adding ZnSO4 solution to make Zn in the solution2+To a final concentration of 0.1mmol/mL, and finally adjusting the pH of the solution to 7.0.
The second step is that: bacterial suspension was prepared with PBS solution:
the strain is as follows: the tested strains are from wild strains separated in the experiment, and comprise Escherichia coli, pseudomonas putida, Klebsiella pneumoniae, Citrobacter freundii, Enterobacter cloacae and Enterobacter mucosae. Firstly, separating and purifying a sample on a Macconkey agar culture medium, then scratching lawn on an LB agar culture medium, culturing for 16-24h at 37 ℃, and identifying the strain species by MALDI-TOF. The negative control strain ATCC25922 was stored for the laboratory.
Preparing a bacterial suspension: the bacterial suspension was prepared by scraping a colony of 10uL of the strain into 500uL of LPBS (pH 7.4), vortexing and adjusting the bacterial suspension to an OD of 1.3OD to 1.7OD at 600 nm.
The third step: mixing the bacterial suspension and solution
100ul of the solutionA solution was pipetted into a 96-well plate and mixed with the solutionA solution after 100ul of the bacterial suspension was pipetted.
The fourth step: putting the 96-well plate into a full-automatic enzyme standard instrument to detect the OD value of the mixed solution:
and (3) placing the 96-hole plate added with the mixed solution in the last step into a full-automatic enzyme labeling instrument, setting the temperature of the enzyme labeling instrument to be 37 degrees, detecting the OD value of the mixed solution at the wavelength of 615nm and 720nm respectively every 5min, detecting for 1h, and deriving the original data of the OD value of the mixed solution.
The fifth step: selecting an AI model, carrying out model training and verification to obtain an optimal AI model, introducing OD value original data of the mixed solution into the optimal AI model, selecting for circular calculation, outputting a characteristic vector, and analyzing through a full-connection network to obtain a carbapenemase production result of the strain
Design of LSTM model:
in order to more fully verify the efficacy of the AI model in enzyme production resolution, 4 common intelligent models were selected for this experiment: a decision tree model, an AdaBoost model, an SVM model and an LSTM model. The decision tree is chosen because it is highly explanatory and allows training of an easily understandable model. The SVM is a commonly used algorithm in a small sample classification algorithm and is suitable for the sample condition of the experiment. AdaBoost is one of the representatives of ensemble learning, and can be understood as a comprehensive decision model for collecting a plurality of decision trees. The LSTM is a representative of a deep learning time sequence model, and has a prominent effect on mining the time sequence characteristics of the sample. More specifically, the decision tree model uses a CART classification regression tree algorithm. The AdaBoost model uses 50 decision trees to implement the integrated decision. The SVM model uses a gaussian kernel function to process the non-linear data. The LSTM model uses a single layer of 128 neurons of LSTM. The above model settings are the best choices to iteratively verify adjustments on the training set.
The OD value data of enzyme production experiments of 13 time points within 1 hour of 517 strains are collected in the experiments, and 80% of the data is used as a learning sample of an AI model for model training to achieve higher precision so as to construct a final model. The remaining 20% of the data is used as the data for finally verifying the model accuracy. In order to further accurately evaluate the efficiency of the model, a cross validation method is used in the experiment, repeated training and validation are carried out for multiple times, the average value of validation indexes is taken as the quantitative presentation of the efficiency of the model, and meanwhile, the standard deviation of the accuracy of the model in repeated training and validation can be obtained to evaluate the stability of the model.
Wherein, fig. 2 shows the test result of the decision tree model, the accuracy and the standard deviation are 0.9766 and 0.0218 respectively, the number of samples with decision errors is 12 in the verification process, and it can be seen from the samples with decision errors that the decision tree can not grasp the timing relationship, resulting in a higher error rate; FIG. 3 shows the test results of the AdaBoost model, the accuracy and standard deviation are 0.9883 and 0.0157 respectively, and the number of wrong samples is 6 in the verification process, which is reduced by one time compared with the decision tree; FIG. 4 shows the test results of SVM model, the accuracy and standard deviation are 0.9902 and 0.01312, respectively, SVM obtains the same level of effect as AdaBoost, only one correct sample is detected more than AdaBoost, and the number of wrong samples is 5; FIG. 5 shows the LSTM model test results, the accuracy and the standard deviation are respectively 0.9941 and 0.01251, it can be seen that the accuracy is improved by an order of magnitude, and the number of wrong samples is only 3 in the verification process; figure 6 is an accuracy versus standard deviation for 4 models.
Since the data is time series data, LSTM was used as the experimental model. The LSTM is a recurrent neural network that preserves useful long-term information and removes useless short-term information through a threshold mechanism to achieve mining of timing information.
And sequentially inputting the OD value of each moment into a recurrent neural module of the LSTM, circularly calculating the LSTM, outputting a characteristic vector, and passing through a full-connection network to finally obtain an enzyme-producing positive result.
The detailed structure of the LSTM model is shown in fig. 7.
Model training and validation
The original OD value data of enzyme production experiments of 13 time points within 1 hour of 517 strains are collected in the experiments, and 80% of the data is used as a learning sample of an AI model for model training to achieve higher precision so as to construct a final model. The remaining 20% of the data is used as the data for finally verifying the model accuracy.
In the training plan, an Adam gradient descent function is used as a model parameter optimizer, cross control is used as a loss function, a gradient cutoff threshold value is 1.0, a learning rate is 0.001, and the iteration number is 2000.
Let x be the input OD value, i.e. training data, W be the LSTM model parameters, y be the output result, and y' be the label, i.e. correct result, then the training process is as follows:
the model training and verification are carried out in the specific process:
using 80% of data as a learning sample, performing model training, and using 20% of data as verification data;
cross entry is adopted as a loss function in the model training, an Adam gradient descent mode is adopted, and multiple iterations are performed to optimize model parameters by using training data so as to minimize the loss function;
s1, calculation process of LSTM:
the LSTM takes the OD value of each time point as input, the number of the time points is recorded as n, each time point is traversed during the calculation of the LSTM, and the input is independently used for carrying out once cycle calculation; setting the number of LSTM neurons as 8; setting t as the current time point;
the LSTM has two transmission states, one CtOne ht(ii) a Current input x of LSTMtAnd h passed by the last statet-1Four states are obtained by splicing calculation:
ft=σ(Wf*[ht-1,xt]+bf),
it=σ(Wi*[ht-1,xt]+bi),
Figure BDA0001963009790000081
ot=σ(Wo*[ht-1,xt]+bo),
wherein f istTo forget gating, itFor memory gating,
Figure BDA0001963009790000082
To input data, otTo control the current output; wfTo forget the weight matrix of gating, bfA bias to forget gating; wiFor memory-gated weight matrices, biA bias for memory gating; wcAs a weight matrix of the input data, bcAn offset for the input data; woTo control the weight matrix of the current output, boTo control the bias of the current output; sigma is an activation function;
different states have different weight matrixes W and offsets b, and optimization parameters need to be trained to obtain training parameters; the weight matrix is a matrix of (k +1) × k, and [ ht-1,xt]Multiplying to obtain a vector with the length of k, namely k neurons; wherein h ist-1Is a vector of length k; x is the number oftIs the OD value at the time t; all the weight matrixes and the initial values of the bias are randomly generated based on normal distribution with the mean value of 0 and the variance of 1;
ftto forget gating, the previous state C is for the objectt-1;itFor memory gating, the input is now for the object
Figure BDA0001963009790000091
Then C istUpdating is carried out according to forgetting gating and memorizing gating:
Figure BDA0001963009790000092
otcontrolling the current output while htAccording to otUpdating:
ht=ot*tanh(Ct),
after the LSTM calculation is completed, a full-connection network is used, so that the final output node is z, which indicates whether enzyme is produced or not:
z=Wz*hn+bz
wherein the content of the first and second substances,Wzweight matrix for fully connected networks, bzFor the bias of a fully connected network, hnThe final output of the LSTM;
s2, calculation process of loss function:
cross entry is used as a LOSS function, and is recorded as LOSS, and is calculated as follows:
Figure BDA0001963009790000093
Figure BDA0001963009790000094
wherein c is the sample size; z is a matrix formed by all samples after the calculation in the previous step, each sample is calculated to obtain a vector, the length of the vector is 2, the vector means that enzyme is produced or enzyme is not produced, and the matrix with the size of c x 2 is obtained by c samples; exp is an exponential function with a natural constant e as the base; the softmax function is used for converting the value range of the input value into 0-1 so as to simulate the probability;
Figure BDA0001963009790000095
the predicted value is calculated by softmax and is a matrix of c x 2; y is the true value, which is likewise a matrix of c x 2, and for each sample, there is a vector [1,0 ] if enzyme is produced]If no enzyme is produced, the directed amount is [0,1 ]];yTIs the transpose of matrix y;
Figure BDA0001963009790000096
is an identity matrix;
s3 calculation process of training algorithm
Using a parameter optimization algorithm Adam as a training algorithm, setting parameters as follows: learning rate α, α is 0.001; exponential decay rate beta of first moment estimation1,β10.9; exponential decay rate beta of first moment estimation2,β20.999; the parameter epsilon, epsilon-10 e-8; training time THRESHOLD, THRESHOLD 2000;
the parameter optimization algorithm Adam aims at a loss function, and the loss function takes the whole training parameters as independent variables, namely all weight matrixes and offsets; gradient v is determined for the loss functionθFtt-1);
And if the current training times is t, the parameter optimization algorithm Adam has the following calculation process:
gt=▽θFtt-1),
mt=β1*mt-1+(1-β1)*gt
Figure BDA0001963009790000101
Figure BDA0001963009790000102
Figure BDA0001963009790000103
Figure BDA0001963009790000104
wherein, gtIn order to estimate the first moment of the image,
Figure BDA0001963009790000106
is a second moment estimation; alpha is the learning rate; beta is a1An exponential decay rate estimated for the first moment; beta is a2An exponential decay rate estimated for the second moment; ε is a very small number, which is to prevent division by zero in the implementation; m ist,vtIs an exponentially weighted moving average;
Figure BDA0001963009790000105
correcting the deviation; thetat-1The parameter set is completed by the previous round of training; thetatThe parameter set finished by the training of the round is obtained;
when the training frequency reaches THRESHOLD, the training is finished; the training curve is shown in fig. 8.
The model verification uses a cross verification mode, repeated training verification is carried out for multiple times, the average value of verification indexes is taken as quantitative display of the model efficiency, and meanwhile, the standard deviation of the model accuracy in repeated training verification can be obtained to evaluate the stability of the model. FIG. 9 is a diagram of 10-fold cross validation, where each validation uses a different tenth of the data in the training set as validation and the rest as training.
The final result of the cross validation is:
accuracy 0.994174757282
Standard deviation of 0.0125143666203
Accuracy 0.997347480106
Regression property 0.994708994709
Analysis of model validation results
The final test results of the LSTM model are shown in fig. 6, presented in terms of accuracy, standard deviation, and samples with detection errors.
Supplementary LSTM experiment
In the above experiment, when the OD value data at 13 time points are all used, the accuracy of the LSTM model is high, so the experiments further try to use the OD values at 8 time points of 0min and 5min,10min,15min,20min,25min,30min,35min,40min, and 45min respectively as the input of the LSTM neural network in a binary form. Finally, 8 corresponding LSTM models are obtained, and the training process is shown in fig. 10.
The results of analyzing the recognition effect of LSTM using the verification data are shown in fig. 11. As can be seen from fig. 10, the accuracy corresponding to different inputs is over 92%, wherein the accuracy of the LSTM model using OD values of 0min and 5min as inputs is 92%, which is the lowest of all models, and the accuracy of the remaining models is over 95%, wherein the accuracy of the LSTM model using OD values of 0min and 35min as inputs is 98.6%, which is the highest of each model.
After the time is more than 10min, the accuracy of any two time points is more than 95%, the accuracy of 0min-20min is 97.5%, and the accuracy of 0min-35min is up to 99%, so that whether the strain produces carbapenemase can be rapidly judged by analyzing the OD value of any time point after 0min and 10min by using a computer model, and the labor, material and time cost for judging carbapenem drug-resistant strains in clinical treatment are greatly reduced. In the figure, the horizontal axis represents the number of training iterations and the vertical axis represents the error of the model, expressed as cross entry loss function values.
The OD values of the strains at 13 time points within 1 hour are analyzed at the beginning of the experiment, and the accuracy of the final comparison with Blue-Carba is 99.41%, which shows that the method for analyzing the OD value data of the strains under specific wavelength by using an AI model to judge whether the strains are carbapenemase positive strains is feasible and has extremely high accuracy and high efficiency.
LSTM result analysis
After data are introduced into an LSTM model, the trend of change among OD (OD) of the strains can be immediately and visually seen through depth analysis of the LSTM model, the OD value of a strain solution is gradually reduced along with the time, the OD value of a positive control (NDM-5) is basically between 0.2OD < - > 05OD from the beginning, a curve is a stable straight line, the OD value of a negative control strain is about 1.5OD, the OD values of the rest of enzyme-producing strains are gradually reduced from 1.5OD to about 0.2OD, and whether the strains produce carbapenemase or not can be basically judged approximately after 20 min. And the change curves of OD values of strains with different enzyme production strengths are obviously different, the change curve of OD values of the drug-resistant gene of VIM-2 is obviously more slow than that of NDM-1 and NDM-5, and the change curve of OD values of the strains carrying NDM-1 and VIM-4 is obviously slower than that of other strains only carrying a single drug-resistant gene, and then the change curve is in a slow rising trend all the time, so that the phenomenon is worthy of careful study. Therefore, the strength of the enzyme-producing ability of the strain can be judged by the change of the OD value of the strain. As shown in FIG. 12, the variation trends of different OD values also visually indicate the strength of the carbapenemase-producing ability of the strain.
Fig. 13 shows that the LSTM model can detect combinations of a plurality of binary time points, so that in an experiment, whether a strain produces carbapenemase can be determined by detecting changes in OD values of the strain at any two time points, and how many strains producing enzyme-positive strains in a batch of strains can be directly obtained.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (6)

1. A method for rapidly detecting carbapenemase-producing strains by using an AI model, which is characterized by comprising the following steps:
preparing solutionA solution by using a Blue-Carba method; adding imipenem into bromothymol blue solution, adding ZnSO4 solution, and adjusting the pH of the solution to 7.0 to obtain solutionA solution;
selecting a wild strain, preparing a bacterial suspension by using PBS liquid: separating and purifying the sample on a Macconkey agar culture medium, scratching and culturing a lawn on an LB agar culture medium, and identifying the strain species through MALDI-TOF; scraping semi-ring lawn into PBS (phosphate buffer solution) by using 10ul of inoculating ring, uniformly mixing by vortex, and adjusting the OD value of the solution to obtain a bacterial suspension; the wild strains comprise Escherichia coli, Pseudomonas putida, Klebsiella pneumoniae, Citrobacter freundii, Enterobacter cloacae and Enterobacter mucosae;
the solutionina solution and bacterial suspension were mixed well: sucking the solutionA solution, adding the solution into a 96-well plate, sucking the bacterial suspension and uniformly mixing the solution with the solutionA solution;
detecting the OD value of the mixed solution by using a full-automatic enzyme standard instrument: putting a 96-pore plate of the mixed solution into a full-automatic enzyme labeling instrument, setting detection temperature and detection time, detecting OD values of the mixed solution at wavelengths of 615nm and 720nm respectively, and deriving original data;
selecting an AI model, carrying out model training and verification,
the model training and verification are carried out in the specific process:
using 80% of data as a learning sample, performing model training, and using 20% of data as verification data;
cross entry is adopted as a loss function in the model training, an Adam gradient descent mode is adopted, and multiple iterations are performed to optimize model parameters by using training data so as to minimize the loss function;
s1, calculation process of LSTM:
the LSTM takes the OD value of each time point as input, the number of the time points is recorded as n, each time point is traversed during the calculation of the LSTM, and the input is independently used for carrying out once cycle calculation; setting the number of LSTM neurons as k; setting t as the current time point;
the LSTM has two transmission states, one CtOne ht(ii) a Current input x of LSTMtAnd h passed by the last statet-1Four states are obtained by splicing calculation:
ft=σ(Wf*[ht-1,xt]+bf),
it=σ(Wi*[ht-1,xt]+bi),
Figure FDA0003347242150000011
ot=σ(Wo*[ht-1,xt]+bo),
wherein f istTo forget gating, itIn order to memorize the gate control,
Figure FDA0003347242150000012
to input data, otTo control the current output; wfTo forget the weight matrix of gating, bfA bias to forget gating; wiFor memory-gated weight matrices, biA bias for memory gating; wcAs a weight matrix of the input data, bcAn offset for the input data; woTo control the weight matrix of the current output, boTo control the bias of the current output; sigma is an activation function;
different states have different weight matrices W and offsetsb, training optimization parameters are required to obtain training parameters; the weight matrix is a matrix of (k +1) × k, and [ ht-1,xt]Multiplying to obtain a vector with the length of k, namely k neurons; wherein h ist-1Is a vector of length k; x is the number oftIs the OD value at the time t; all the weight matrixes and the initial values of the bias are randomly generated based on normal distribution with the mean value of 0 and the variance of 1;
ftto forget gating, the previous state C is for the objectt-1;itFor memory gating, the input is now for the object
Figure FDA0003347242150000021
Then C istUpdating is carried out according to forgetting gating and memorizing gating:
Figure FDA0003347242150000022
otcontrolling the current output while htAccording to otUpdating:
ht=ot*tanh(Ct),
after the LSTM calculation is completed, a full-connection network is used, so that the final output node is z, which indicates whether enzyme is produced or not:
z=Wz*hn+bz
wherein, WzWeight matrix for fully connected networks, bzFor the bias of a fully connected network, hnThe final output of the LSTM;
s2, calculation process of loss function:
cross entry is used as a LOSS function, and is recorded as LOSS, and is calculated as follows:
Figure FDA0003347242150000023
Figure FDA0003347242150000024
wherein c is the sample size; z is a matrix formed by all samples after the calculation in the previous step, each sample is calculated to obtain a vector, the length of the vector is 2, the vector means that enzyme is produced or enzyme is not produced, and the matrix with the size of c x 2 is obtained by c samples; exp is an exponential function with a natural constant e as the base; the softmax function is used for converting the value range of the input value into 0-1 so as to simulate the probability;
Figure FDA0003347242150000025
the predicted value is calculated by softmax and is a matrix of c x 2; y is the true value, which is likewise a matrix of c x 2, and for each sample, there is a vector [1,0 ] if enzyme is produced]If no enzyme is produced, the directed amount is [0,1 ]];yTIs the transpose of matrix y;
Figure FDA0003347242150000026
is an identity matrix;
s3, calculation process of training algorithm:
using a parameter optimization algorithm Adam as a training algorithm, setting parameters as follows: learning rate α, α is 0.001; exponential decay rate beta of first moment estimation1,β10.9; exponential decay rate beta of first moment estimation2,β20.999; the parameter epsilon, epsilon-10 e-8; training time THRESHOLD, THRESHOLD 2000;
the parameter optimization algorithm Adam aims at a loss function, and the loss function takes the whole training parameters as independent variables, namely all weight matrixes and offsets; graduating loss functions
Figure FDA0003347242150000031
And if the current training times is t, the parameter optimization algorithm Adam has the following calculation process:
Figure FDA0003347242150000032
mt=β1*mt-1+(1-β1)*gt
Figure FDA0003347242150000038
Figure FDA0003347242150000033
Figure FDA0003347242150000034
Figure FDA0003347242150000035
wherein, gtIn order to estimate the first moment of the image,
Figure FDA0003347242150000037
is a second moment estimation; alpha is the learning rate; beta is a1An exponential decay rate estimated for the first moment; beta is a2An exponential decay rate estimated for the second moment; ε is a very small number, which is to prevent division by zero in the implementation; m ist,vtIs an exponentially weighted moving average;
Figure FDA0003347242150000036
correcting the deviation; thetat-1The parameter set is completed by the previous round of training; thetatThe parameter set finished by the training of the round is obtained;
when the training frequency reaches THRESHOLD, the training is finished;
the verification data is verified by adopting a cross verification method through repeated training for multiple times, the average value of verification indexes is taken as the quantitative display of the model efficiency, and the standard deviation of the model accuracy is obtained;
and (3) introducing the OD value original data of the mixed solution into the optimal AI model, and analyzing to obtain the result of the carbapenemase produced by the strain.
2. The method for rapid detection of carbapenemase-producing strains using AI model as claimed in claim 1, wherein the bromothymol blue solution is 0.4% and pH 6.0.
3. The method for rapidly detecting carbapenemase-producing strains by using AI model as claimed in claim 1, wherein the solutionA has an imipenem content of 3 mg/mL; in the solutionA, Zn2+The concentration was 0.1 mmol/mL.
4. The method for rapid detection of carbapenemase-producing strains using AI model as claimed in claim 1, wherein the culturing is carried out at 37 ℃ for 16h-24 h.
5. The method for rapidly detecting carbapenemase-producing strains by using AI model as claimed in claim 1, wherein the bacterial suspension is prepared by: scraping a cyclosporine into 500uLPBS solution with 10uL inoculating loop, adjusting pH to 7.4 in PBS solution, mixing by vortex, and adjusting OD value of bacterial suspension to 1.3-1.7 OD at 600nm wavelength.
6. The method for rapidly detecting carbapenemase-producing strains by using AI model as claimed in claim 1, wherein the OD value of the mixed solution is measured by: and (3) putting the 96-pore plate added with the mixed solution into a full-automatic enzyme labeling instrument, setting the temperature of the enzyme labeling instrument to be 37 ℃, detecting the OD value of the mixed solution at the wavelengths of 615nm and 720nm respectively every 5 minutes, and leading out the original data of the OD value of the mixed solution, wherein the detection time is 1 h.
CN201910090138.8A 2019-01-30 2019-01-30 Method for rapidly detecting strain producing carbapenemase by using AI model Active CN109722466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910090138.8A CN109722466B (en) 2019-01-30 2019-01-30 Method for rapidly detecting strain producing carbapenemase by using AI model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910090138.8A CN109722466B (en) 2019-01-30 2019-01-30 Method for rapidly detecting strain producing carbapenemase by using AI model

Publications (2)

Publication Number Publication Date
CN109722466A CN109722466A (en) 2019-05-07
CN109722466B true CN109722466B (en) 2022-03-25

Family

ID=66300400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910090138.8A Active CN109722466B (en) 2019-01-30 2019-01-30 Method for rapidly detecting strain producing carbapenemase by using AI model

Country Status (1)

Country Link
CN (1) CN109722466B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015193501A1 (en) * 2014-06-19 2015-12-23 Université Catholique de Louvain Method for detecting enzyme activity hydrolyzing beta-lactam ring antimicrobial agents
CN105861630A (en) * 2011-06-22 2016-08-17 国家医疗保健研究所 Method for detecting the presence of carbapenemase-producing bacteria in a sample
WO2018203084A1 (en) * 2017-05-04 2018-11-08 Oxford Nanopore Technologies Limited Machine learning analysis of nanopore measurements
CN108764050B (en) * 2018-04-28 2021-02-26 中国科学院自动化研究所 Method, system and equipment for recognizing skeleton behavior based on angle independence

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105861630A (en) * 2011-06-22 2016-08-17 国家医疗保健研究所 Method for detecting the presence of carbapenemase-producing bacteria in a sample
WO2015193501A1 (en) * 2014-06-19 2015-12-23 Université Catholique de Louvain Method for detecting enzyme activity hydrolyzing beta-lactam ring antimicrobial agents
WO2018203084A1 (en) * 2017-05-04 2018-11-08 Oxford Nanopore Technologies Limited Machine learning analysis of nanopore measurements
CN108764050B (en) * 2018-04-28 2021-02-26 中国科学院自动化研究所 Method, system and equipment for recognizing skeleton behavior based on angle independence

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Blue-carba, an easy biochemical test for detection of diverse carbapenemase producers directly from bacterial cultures;J Pires等;《J Clin Microbiol》;20131009;第51卷(第12期);第38-71、81页 *
耐药性细菌碳青霉烯酶检测方法研究进展;徐建民等;《标记免疫分析与临床》;20170330;第24卷(第3期);第349-355页 *
色差法检测乳品细菌数量的数学模型;王树忠等;《哈尔滨理工大学学报》;20110630;第16卷(第3期);第4281-4283页 *

Also Published As

Publication number Publication date
CN109722466A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
US10919791B2 (en) Intelligent identification method of sludge bulking based on type-2 fuzzy neural network
CN109190665A (en) A kind of general image classification method and device based on semi-supervised generation confrontation network
CN112735511B (en) Cold damage cucumber PSII potential activity prediction method based on QGA-SVR
CN114360652B (en) Cell strain similarity evaluation method and similar cell strain culture medium formula recommendation method
CN113435707B (en) Soil testing formula fertilization method based on deep learning and weighting multi-factor evaluation
CN113699592A (en) Method for growing large-size LBO crystal by machine learning assistance and application thereof
CN115453064B (en) Fine particulate matter air pollution cause analysis method and system
CN101556242A (en) Method for discriminating microorganism by utilizing Fourier infrared spectrum
CN109722466B (en) Method for rapidly detecting strain producing carbapenemase by using AI model
Wang et al. Digital image processing technology under backpropagation neural network and K-Means Clustering algorithm on nitrogen utilization rate of Chinese cabbages
CN114334024A (en) Fermentation process soft measurement modeling method based on rapid component transfer learning
CN112364710B (en) Plant electric signal classification and identification method based on deep learning algorithm
Jamshidi et al. High throughput mathematical modeling and multi-objective evolutionary algorithms for plant tissue culture media formulation: Case study of pear rootstocks
CN117441649A (en) Penaeus monodon breeding method and system based on growth trait uniformity
Lin et al. The Flora Compositions of Nitrogen‐Fixing Bacteria and the Differential Expression of nifH Gene in Pennisetum giganteum zx lin Roots
CN114092784A (en) Mixed dye liquor concentration spectrum detection method based on long-term and short-term memory neural network
Osborne et al. Natural variation of Macrocystis pyrifera gametophyte germplasm culture microbiomes and applications for improving yield in offshore farms
CN115064218A (en) Method and device for constructing pathogenic microorganism data identification platform
US20210375398A1 (en) Machine Learning-Based Analysis of Process Indicators to Predict Sample Reevaluation Success
EP4323912A1 (en) Analyzing microscope images of microalgae culture samples
CN113221436A (en) Soft measurement method for sewage suspended matter concentration based on improved RBF neural network
Grigoryeva et al. Specific features of feed-forward neural networks application in classification and regression problems in algology
CN114093418B (en) Detection method for evaluating soil activity
CN114317675B (en) Method and system for detecting bacteria on different wound surfaces based on machine learning qualitative and quantitative detection
Cui et al. Growth stage prediction of Haematococcus pluvialis based on GRNN and PNN neural networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant