Thyroid disease course development time sequence analysis method based on LSTM network
Through the thyroid disease course development timing analysis method based on the LSTM network, the problem of traditional methods ignoring time series information is solved, and effective prediction of the development trend of the thyroid disease course is achieved, helping doctors to formulate accurate treatment plans and improve patient prognosis.
Patent Information
- Application Number
- CN202411530064.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional thyroid disease analysis methods ignore the time series information in the course of the disease and cannot make full use of historical data to predict future course development.
The thyroid disease course development timing analysis method based on the LSTM network is used to predict the development trend of the disease by performing time series analysis of the patient's disease course data. The method includes data collection and preprocessing, LSTM network model construction, timing analysis and prediction, and clinical decision support.
By capturing the time dependence relationship in the course of thyroid disease, the LSTM network can effectively predict the development trend of the disease, help doctors develop more accurate treatment plans, and improve patients' prognosis.
Smart Images

Figure CN119517394A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical information processing and analysis, and in particular to a thyroid disease course development time series analysis method based on an LSTM (Long Short-Term Memory) network. Background Art
[0002] The course of thyroid disease usually has obvious time dependence, and its development and changes are affected by many factors, including genetic factors, environmental factors, eating habits, treatment plans, etc. Therefore, the time series analysis of the course of thyroid disease has important clinical significance, which helps doctors better understand the changing trend of patients' conditions, optimize treatment plans, and improve patients' prognosis. Traditional thyroid disease analysis methods mainly rely on static medical record data, and doctors diagnose and treat patients based on their current symptoms and examination results. However, this method ignores the time series information in the course of the disease and cannot make full use of historical data to predict the future course of the disease. With the development of medical informatization, more and more medical data are stored in the form of electronic medical records, which provides the possibility for data-driven time series analysis.
[0003] LSTM (Long Short-Term Memory) network is a special recursive neural network (RNN), which is designed to solve the gradient vanishing and gradient exploding problems of traditional RNN when dealing with long-term dependency problems. LSTM network can effectively capture and memorize long-term dependencies in the course of disease by introducing forget gate, input gate and output gate. Therefore, LSTM network has significant advantages in processing long sequence data such as thyroid disease course. The purpose of the present invention is to provide a thyroid disease course development time series analysis method based on LSTM network, by performing time series analysis on the patient's course data, predicting the development trend of the disease, and helping doctors to formulate more accurate treatment plans. Summary of the invention
[0004] 1. Technical problems to be solved:
[0005] The method by which doctors diagnose and treat patients based on their current symptoms and examination results ignores the time series information in the course of the disease and cannot fully utilize historical data to predict the future course of the disease.
[0006] In view of the above technical problems, the present invention provides a time series analysis method for the development of thyroid disease based on LSTM (Long Short-Term Memory) network. The purpose is to predict the development trend of the disease by performing time series analysis on the course data of patients with thyroid disease, and to provide a scientific basis for clinical decision-making.
[0007] 2. Technical solution:
[0008] A method for analyzing the time series of thyroid disease progression based on an LSTM network comprises the following steps:
[0009] Step 1: Data collection and preprocessing: collect the time series data related to the course of the patient's thyroid disease and standardize the time series data;
[0010] Step 2: LSTM network model construction: Design the LSTM network model and use the time series data standardized in step 1 to train the LSTM network model to capture the time dependency in the course of thyroid disease; optimize the performance of the LSTM network model through cross-validation and hyperparameter tuning;
[0011] Step 3: Time series analysis and prediction: Use the trained LSTM network model to perform time series analysis on the course of thyroid disease and predict the future development trend of the disease; verify the prediction results and evaluate the effect in combination with actual clinical data;
[0012] Step 4: Clinical decision support: Apply the results of time series analysis to the clinical decision support system to assist doctors in developing personalized treatment plans and follow-up plans.
[0013] Furthermore, the time series data collected in step 1 comes from the hospital's electronic medical record system, laboratory examination system, and imaging database, as follows:
[0014] Input feature data;
[0015] Treatment plan data: including thyroid medication use (drug type, dosage, medication time), radiation therapy dose, and surgical method;
[0016] Lifestyle data: including quantitative indicators of iodine intake, exercise intensity and frequency, smoking amount (cigarettes / day), alcohol consumption (ml / day), and regularity of work and rest;
[0017] Basic disease data: including history of autoimmune diseases and family medical history;
[0018] Environmental factor data: including iodine content levels in the place of residence and pathogenic factors in the occupational environment;
[0019] Output target data:
[0020] Thyroid function indicators: The main indicators include the dynamic changes of TSH values (reference range 0.27-4.2mIU / L); the secondary indicators include free T3 (FT3) values (reference range 3.1-6.8pmol / L) and free T4 (FT4) values (reference range 12-22pmol / L);
[0021] Thyroid antibody levels: TPOAb, TGAb;
[0022] Ultrasound characteristics: nodule size, echo characteristics;
[0023] The restrictions on the feature data input into the LSTM network model are as follows:
[0024] Input time series length: at least 6 consecutive months of historical data are required;
[0025] TSH value prediction range: Model output is limited to the clinically possible range (0-100mIU / L);
[0026] Data time interval: All input data are standardized according to monthly sampling;
[0027] Feature correlation threshold: The Pearson correlation coefficient between the input feature and TSH change must be greater than 0.3 to be included in the model.
[0028] Furthermore, the standardization of the time series data in step 1 includes the following steps:
[0029] (1) Structured processing: Arrange the time series data in chronological order to form a time series data set. Each data point in the time series data set includes a timestamp, data type, and data value.
[0030] (2) Detect and process outliers in time series data sets;
[0031] (3) Fill in missing values in the time series set;
[0032] (4) Normalize the data values of the time series data set: The normalization formula is:
[0033]
[0034] Where X is the original data of the data point, X′ is the normalized data, min(X) and max(X) are the minimum and maximum values of the same type of data, and the normalized data range is [0,1].
[0035] Furthermore, the outlier detection methods in step (2) include a z-score method based on statistics, a box plot method, and an isolation forest algorithm based on machine learning. The calculation formula of the z-score method is:
[0036]
[0037] Where z is the z-score value, X is the original data of the data point, μ is the mean of multiple original data of the same type, and σ is the standard deviation. When |z|>3, the original data of the data point is considered to be an outlier.
[0038] Furthermore, the method for filling the missing values in the time series set in step (3) includes mean filling, interpolation, forward filling and backward filling. The formula for mean filling is:
[0039]
[0040] Among them, X filled is the filled data, X i is the existence value, and N is the number of existence values.
[0041] Furthermore, the LSTM network model is a deep neural network model comprising a model input layer, a network body and a model output layer, and is used to capture the time dependency in the course of thyroid disease;
[0042] The model input layer receives time series data; the main body of the network adopts three layers of LSTM units. The first layer is the unit input layer, and the number of nodes is the same as the feature dimension. The second and third layers are unit hidden layers, and the number of nodes are 128 and 64 respectively. Each layer of LSTM units contains a forget gate, input gate and output gate to control the flow of information. The internal activation function of the model adopts a combination of sigmoid and tanh; the model output layer uses the ReLU function, and the Dropout mechanism (rate is 0.2) is used to prevent overfitting; the model output layer is designed for multi-target prediction, including the predicted values of thyroid function indicators, nodule size change prediction values and disease risk scores in different time periods in the future (1-3 months, 3-6 months, 6-12 months).
[0043] Furthermore, the LSTM network model in step 2 includes the following parts:
[0044] Forget gate: controls the cell state C at the previous moment t-1 Whether it has been forgotten, the formula is:
[0045] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0046] Among them, f t is the output of the forget gate, W f is the weight matrix of the forget gate, h t-1 is the hidden state at the previous moment, x t is the current input, b f is the bias term of the forget gate.
[0047] Input gate: determines the input x at the current moment t How much content needs to be updated to the cell state? The formula is:
[0048] it =σ(W i ·[h t-1 ,x t ]+b i )
[0049] Among them, i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate.
[0050] Candidate memory cells: Generate candidate memory cells at the current moment The formula is:
[0051]
[0052] in, is a candidate memory unit, W c is the weight matrix of the candidate memory unit, b C is the bias term.
[0053] Output gate: controls the cell state C t Output to hidden state h t The amount of information is:
[0054] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0055] Among them, t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate.
[0056] Update cell state: Combine the output of the forget gate and the input gate to update the cell state C t , the formula is:
[0057]
[0058] Calculate the hidden state: Finally calculate the hidden state h at the current moment t , the formula is:
[0059] h t =o t tanh(C t ).
[0060] Furthermore, the training method of the LSTM network model in step 2 is as follows:
[0061] a. Data preparation: Divide the data after the standardization process in step 1 into training set, validation set and test set, and use the data X′ of the training set as the current input x t To train the LSTM network model;
[0062] b. Model training. During the training process, the time-based back-propagation algorithm is used to update the weights and bias items of the LSTM network. The Adam optimization algorithm or the RMSprop optimization algorithm is used to minimize the loss function. The loss function is expressed by the mean square error (MSE), and its formula is:
[0063]
[0064] Among them, y i is the true value, is the model prediction value, and N is the number of samples.
[0065] The update formula of the Adam optimization algorithm is:
[0066] m t =β1m t-1 +(1-β1)g t
[0067]
[0068] Among them, m t and v t are the first-order and second-order moment estimates, g t is the gradient, α is the learning rate, and ε is a small constant to prevent division by zero errors;
[0069] c. Model verification and tuning: Use the data from the validation set to verify the performance of the model and optimize the model by adjusting hyperparameters (such as learning rate, number of LSTM layers, number of hidden units); the verification indicators include MSE, MAE (mean absolute error), and R^2 (coefficient of determination);
[0070] d. After the model training is completed, the test set is used to perform a final evaluation of the model to verify its generalization ability on unseen data. The evaluation indicators of the test set also include MSE, MAE, and R^2.
[0071] 3. Beneficial effects:
[0072] The present invention provides a time series analysis method for the course of thyroid disease based on LSTM network. By performing time series analysis on the course data of patients with thyroid disease, the development trend of the disease is predicted, and a scientific basis is provided for clinical decision-making, which helps doctors better understand the trend of the patient's condition change, optimize the treatment plan, and improve the patient's prognosis. LSTM network can effectively capture and memorize long-term dependencies in the course of disease, and has significant advantages in processing long sequence data such as the course of thyroid disease. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 The figure is a general flow chart of the method for analyzing the time series of thyroid disease progression based on LSTM network of the present invention;
[0074] Figure 2 This is a flow chart of the time series prediction and clinical decision support of the present invention. DETAILED DESCRIPTION
[0075] The present invention will be described in detail below with reference to the accompanying drawings.
[0076] As attached Figure 1 To Attachment Figure 2 As shown, Specific embodiment:
[0078] A method for analyzing the time series of thyroid disease progression based on an LSTM network comprises the following steps:
[0079] Step 1: Data collection and preprocessing: collect the time series data related to the course of the patient's thyroid disease and standardize the time series data;
[0080] Step 2: LSTM network model construction: Design the LSTM network model and use the time series data standardized in step 1 to train the LSTM network model to capture the time dependency in the course of thyroid disease; optimize the performance of the LSTM network model through cross-validation and hyperparameter tuning;
[0081] Step 3: Time series analysis and prediction: Use the trained LSTM network model to perform time series analysis on the course of thyroid disease and predict the future development trend of the disease; verify the prediction results and evaluate the effect in combination with actual clinical data;
[0082] Step 4: Clinical decision support: Apply the results of time series analysis to the clinical decision support system to assist doctors in developing personalized treatment plans and follow-up plans.
[0083] The time series data collected in step 1 comes from the hospital's electronic medical record system (EHR), laboratory examination system, and imaging database, as follows:
[0084] Input feature data;
[0085] Treatment plan data: including thyroid medication use (drug type, dosage, medication time), radiation therapy dose, and surgical method;
[0086] Lifestyle data: including quantitative indicators of iodine intake, exercise intensity and frequency, smoking amount (cigarettes / day), alcohol consumption (ml / day), and regularity of work and rest;
[0087] Basic disease data: including history of autoimmune diseases and family medical history;
[0088] Environmental factor data: including iodine content levels in the place of residence and pathogenic factors in the occupational environment;
[0089] Output target data:
[0090] Thyroid function indicators: The main indicators include the dynamic changes of TSH values (reference range 0.27-4.2mIU / L); the secondary indicators include free T3 (FT3) values (reference range 3.1-6.8pmol / L) and free T4 (FT4) values (reference range 12-22pmol / L);
[0091] Thyroid antibody levels: TPOAb, TGAb;
[0092] Ultrasound characteristics: nodule size, echo characteristics;
[0093] The restrictions on the feature data input into the LSTM network model are as follows:
[0094] Input time series length: at least 6 consecutive months of historical data are required;
[0095] TSH value prediction range: Model output is limited to the clinically possible range (0-100mIU / L);
[0096] Data time interval: All input data are standardized according to monthly sampling;
[0097] Feature correlation threshold: The Pearson correlation coefficient between the input feature and TSH change must be greater than 0.3 to be included in the model.
[0098] The standardization of time series data in step 1 includes the following steps:
[0099] (1) Structured processing: Arrange the time series data in chronological order to form a time series data set. Each data point in the time series data set includes a timestamp, data type, and data value.
[0100] For example:
[0101]
[0102]
[0103] (2) Detect and process outliers in time series data sets;
[0104] (3) Fill in missing values in the time series set;
[0105] (4) Normalize the data values of the time series data set: The normalization formula is:
[0106]
[0107] Where X is the original data of the data point, X′ is the normalized data, min(X) and max(X) are the minimum and maximum values of the same type of data, and the normalized data range is [0,1], which can make data of different dimensions comparable.
[0108] For example, suppose a patient's thyroid hormone level (TSH) data is as follows:
[0109] "2.5, 3.0, 2.8, 3.2, 2.9"
[0110] The maximum value is 3.2mIU / L and the minimum value is 2.5mIU / L. The normalized data is:
[0111] "(2.5-2.5) / (3.2-2.5) = 0.0
[0112] (3.0-2.5) / (3.2-2.5)=0.714
[0113] (2.8-2.5) / (3.2-2.5)=0.429
[0114] (3.2-2.5) / (3.2-2.5)=1.0
[0115] (2.9-2.5) / (3.2-2.5)=0.571”
[0116] The normalized data is:
[0117] "0.0,0.714,0.429,1.0,0.571".
[0118] Furthermore, the outlier detection methods in step (2) include a z-score method based on statistics, a box plot method, and an isolation forest algorithm based on machine learning. The calculation formula of the z-score method is:
[0119]
[0120] Where z is the z-score value, X is the original data of the data point, μ is the mean of multiple original data of the same type, and σ is the standard deviation. When |z|>3, the original data of the data point is considered to be an outlier.
[0121] For example, the thyroid hormone level (TSH) data of a patient is as follows:
[0122] "2.5, 2.8, 2.9, 10.0, 3.0"
[0123] Calculate the mean and standard deviation:
[0124]
[0125] Calculate the z-score value for each data point:
[0126] "z_1=(2.5-4.24) / 3.053=-0.57
[0127] z_2=(2.8-4.24) / 3.053=-0.47
[0128] z_3=(2.9-4.24) / 3.053=-0.44
[0129] z_4=(10.0-4.24) / 3.053=1.88
[0130] z_5=(3.0-4.24) / 3.053=-0.41”
[0131] Since all z-score values are within the range of [-3,3], there are no obvious outliers. If there are outliers, you can choose to delete them or deal with them through other methods.
[0132] Furthermore, the method for filling the missing values in the time series set in step (3) includes mean filling, interpolation, forward filling and backward filling. The formula for mean filling is:
[0133]
[0134] Among them, X filled is the filled data, X i is the existence value, and N is the number of existence values.
[0135] For example, the thyroid hormone level (TSH) data of a patient is as follows:
[0136] "2.5,NaN,2.8,3.2,NaN"
[0137] The mean of the existing values is calculated as follows:
[0138]
[0139] The filled data is:
[0140] "2.5,2.833,2.8,3.2,2.833".
[0141] The construction of the LSTM network model is the core step of the present invention, which aims to capture the time dependency in the course of thyroid disease by designing and training the LSTM network, thereby realizing the prediction of the development trend of the disease.
[0142] The LSTM network is a special recurrent neural network (RNN) that was originally designed to solve the gradient vanishing and exploding problems of traditional RNNs when dealing with long-term dependency problems. The LSTM network introduces forget gates, input gates, and output gates to enable the model to effectively memorize and forget information, thereby capturing long-term dependencies in time series data.
[0143] The LSTM network model is a deep neural network model including a model input layer, a network body and a model output layer, and is used to capture the time dependency in the course of thyroid disease;
[0144] The model input layer receives time series data; the main body of the network adopts three layers of LSTM units. The first layer is the unit input layer, and the number of nodes is the same as the feature dimension. The second and third layers are unit hidden layers, and the number of nodes are 128 and 64 respectively. Each layer of LSTM units contains a forget gate, input gate and output gate to control the flow of information. The internal activation function of the model adopts a combination of sigmoid and tanh; the model output layer uses the ReLU function, and the Dropout mechanism (rate is 0.2) is used to prevent overfitting; the model output layer is designed for multi-target prediction, including the predicted values of thyroid function indicators, nodule size change prediction values and disease risk scores in different time periods in the future (1-3 months, 3-6 months, 6-12 months).
[0145] The LSTM network model in step 2 includes the following parts:
[0146] Forget gate: controls the cell state C at the previous moment t-1 Whether it has been forgotten, the formula is:
[0147] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0148] Among them, f t is the output of the forget gate, W f is the weight matrix of the forget gate, h t-1 is the hidden state at the previous moment, xt is the current input, b f is the bias term of the forget gate.
[0149] Input gate: determines the input x at the current moment t How much content needs to be updated to the cell state? The formula is:
[0150] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0151] Among them, i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate.
[0152] Candidate memory cells: Generate candidate memory cells at the current moment The formula is:
[0153]
[0154] in, is a candidate memory unit, W c is the weight matrix of the candidate memory unit, b C is the bias term.
[0155] Output gate: controls the cell state C t Output to hidden state h t The amount of information is:
[0156] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0157] Among them, t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate.
[0158] Update cell state: Combine the output of the forget gate and the input gate to update the cell state C t , the formula is:
[0159]
[0160] Calculate the hidden state: Finally calculate the hidden state h at the current moment t , the formula is:
[0161] ht =o t tanh(C t ).
[0162] After designing the LSTM network structure, the network needs to be trained using thyroid disease course data so that it can effectively capture the time dependency in the disease course. The training method of the LSTM network model in step 2 is as follows:
[0163] a. Data preparation: Divide the data after the standardization in step 1 into training set, validation set and test set. The training set is used to train the LSTM model, the validation set is used to adjust the model hyperparameters, and the test set is used to evaluate the model performance. t To train the LSTM network model;
[0164] b. Model training. During the training process, the time-based back-propagation algorithm is used to update the weights and bias items of the LSTM network. The Adam optimization algorithm or the RMSprop optimization algorithm is used to minimize the loss function. The loss function is expressed by the mean square error (MSE), and its formula is:
[0165]
[0166] Among them, y i is the true value, is the model prediction value, and N is the number of samples.
[0167] The update formula of the Adam optimization algorithm is:
[0168] m t =β1m t-1 +(1-α1)g t
[0169]
[0170]
[0171] Among them, m t and v t are the first-order and second-order moment estimates, g t is the gradient, α is the learning rate, and ε is a small constant to prevent division by zero errors;
[0172] c. Model verification and tuning: Use the data from the validation set to verify the performance of the model and optimize the model by adjusting hyperparameters (such as learning rate, number of LSTM layers, number of hidden units); the verification indicators include MSE, MAE (mean absolute error), and R^2 (coefficient of determination);
[0173] d. After the model training is completed, the test set is used to perform a final evaluation of the model to verify its generalization ability on unseen data. The evaluation indicators of the test set also include MSE, MAE, and R^2.
[0174] After the LSTM network model is trained, it can be used to perform time series analysis and prediction of the course of thyroid disease to help doctors better understand the development trend of the patient's disease.
[0175] (1) Disease trend analysis: By analyzing the patient's historical disease data through the LSTM network model, long-term trends and cyclical patterns in the disease course can be identified. For example, the LSTM network model can identify the cyclical fluctuations in thyroid hormone levels and help doctors predict future hormone change trends.
[0176] (2) Key event detection: The LSTM network model can also be used to detect key events in the course of the disease, such as the rapid growth of thyroid nodules and the dramatic changes in thyroid function. These key events often indicate the aggravation or deterioration of the disease. Timely detection of these events can help doctors take appropriate intervention measures.
[0177] The LSTM network model can be used for short-term and long-term predictions, as follows:
[0178] (1) Short-term forecast
[0179] Extract the latest time series data from the patient's historical medical history data as the input of the LSTM network model. Short-term predictions usually use data from the last few days or weeks, and the data selection should be able to capture the changing trend of the recent medical course. The input data should be in time series format, such as:
[0180]
[0181]
[0182] Input the prepared input data sequence into the trained LSTM network model for forward inference. The LSTM network model will predict the changes in thyroid hormone levels in the next few days or weeks based on the historical information of the input sequence. The LSTM model will output a series of predicted values representing the thyroid hormone levels in the next few days or weeks.
[0183]
[0184] Doctors can dynamically adjust treatment plans based on short-term prediction results. For example, when the prediction results show that thyroid hormone levels will exceed the normal range, doctors can adjust drug dosages or take other intervention measures in advance to prevent the condition from worsening.
[0185] (2) Long-term forecast
[0186] Long-term prediction requires the use of disease course data over a longer time frame (e.g., several months to several years) to capture long-term trends in the disease course. The data input format is similar to short-term prediction, but the time span is longer. For example:
[0187]
[0188] Input long time series data into the LSTM model to predict long-term trends. The LSTM model will predict the course of the disease in the next few months or years based on the input long-term data. The long-term prediction results output by the model will show the trend of thyroid hormone levels over a long period of time in the future. For example:
[0189]
[0190] Doctors can develop long-term management plans for patients based on long-term prediction results. For example, for patients whose condition is predicted to be stable, the follow-up interval can be appropriately extended; and for patients whose condition is predicted to worsen, intervention measures can be formulated in advance to avoid further aggravation of the condition.
[0191] (3) Verification of prediction results
[0192] After making the prediction, continue to collect the patient's actual disease course data to verify the accuracy of the prediction later. For example:
[0193]
[0194] The prediction results of the LSTM model were compared with the actual data of the patients to evaluate the accuracy of the prediction.
[0195] Clinical decision support: After the prediction is completed, the prediction results need to be compared with the actual disease course data to verify the prediction accuracy of the model. The prediction results can be quantitatively evaluated using indicators such as MSE, MAE, and R^2.
[0196] (1) Personalized treatment plan formulation: The doctor first analyzes the short-term and long-term prediction results of the LSTM model to identify key factors that may affect the treatment effect. For example, if the prediction shows that the patient's thyroid hormone level will continue to rise, the treatment plan may need to be adjusted. Personalized treatment interventions are formulated based on the prediction results. Specifically, they may include: Medication adjustment: Adjust the dose of thyroid hormone replacement therapy to prevent hormone levels from being too high or too low. Lifestyle advice: Advise patients to adjust their diet, increase exercise, or reduce stress in life to assist drug treatment. Other interventions: If necessary, consider surgical intervention or other medical operations. In addition, the doctor treats the patient according to the personalized treatment plan and closely monitors the treatment effect.
[0197] (2) Follow-up plan optimization: Based on the prediction results of the LSTM model, analyze the patient’s future condition stability. If the prediction shows that the condition will stabilize, the doctor can consider extending the follow-up interval; if the prediction shows that the condition may worsen, the follow-up frequency needs to be increased.
[0198] Follow-up plan formulation: Stable patients: For patients whose condition is stable and whose predicted results show that their condition will be stable in the future, the follow-up interval can be appropriately extended, for example, from once a month to once every two months or once a quarter.
[0199] High-risk patients: For patients whose disease is predicted to worsen, the follow-up schedule should be more intensive, for example, adjusting to weekly or biweekly follow-up and increasing the frequency of monitoring items.
[0200] (3) Clinical application example: A doctor first uses the method of the present invention to analyze the thyroid disease course data of a patient. Assuming that the patient's TSH level has fluctuated greatly in the past year, the doctor inputs this data into the LSTM model for analysis. Based on the prediction results of the model, the doctor decides to take intervention measures in advance, including adjusting the dose of thyroid hormone replacement therapy and increasing the frequency of follow-up.
[0201] Although the present invention has been disclosed as above in terms of preferred embodiments, they are not intended to limit the present invention. Anyone skilled in the art can make various changes or modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection defined by the claims of this application.
Claims
1. A time series analysis method for the development of thyroid disease based on LSTM network, characterized in that: The following steps are involved: Step 1: Data collection and preprocessing: collect the time series data related to the course of the patient's thyroid disease and standardize the time series data; Step 2: LSTM network model construction: Design the LSTM network model and use the time series data standardized in step 1 to train the LSTM network model to capture the time dependency in the course of thyroid disease; optimize the performance of the LSTM network model through cross-validation and hyperparameter tuning; Step 3: Time series analysis and prediction: Use the trained LSTM network model to perform time series analysis on the course of thyroid disease and predict the future development trend of the disease; verify the prediction results and evaluate the effect in combination with actual clinical data; Step 4: Clinical decision support: Apply the results of time series analysis to the clinical decision support system to assist doctors in developing personalized treatment plans and follow-up plans.
2. A thyroid disease progression time series analysis method based on LSTM network according to claim 1, characterized in that: The time series data collected in step 1 comes from the hospital's electronic medical record system, laboratory examination system, and imaging database, as follows: Input feature data; Treatment plan data: including thyroid medication use, radiation therapy dose, and surgical method; Lifestyle data: including quantitative indicators of iodine intake, exercise intensity and frequency, smoking, alcohol consumption, and regularity of work and rest; Basic disease data: including history of autoimmune diseases and family medical history; Environmental factor data: including iodine content levels in the place of residence and pathogenic factors in the occupational environment; Output target data: Thyroid function indicators: The main indicators include the dynamic changes of TSH values; the secondary indicators include free T3 (FT3) value and free T4 (FT4) value; Thyroid antibody levels: TPOAb, TGAb; Ultrasound characteristics: nodule size, echo characteristics; The restrictions on the feature data input into the LSTM network model are as follows: Input time series length: at least 6 consecutive months of historical data are required; TSH value prediction range: model output is limited to the clinically possible range; Data time interval: All input data are standardized according to monthly sampling; Feature correlation threshold: The Pearson correlation coefficient between the input feature and TSH change must be greater than 0.3 to be included in the model.
3. A thyroid disease progression time series analysis method based on LSTM network according to claim 1, characterized in that: The standardization of time series data in step 1 includes the following steps: (1) Structured processing: Arrange the time series data in chronological order to form a time series data set. Each data point in the time series data set includes a timestamp, data type, and data value. (2) Detect and process outliers in time series data sets; (3) Fill in missing values in the time series set; (4) Normalize the data values of the time series data set: The normalization formula is: Where X is the original data of the data point, X′ is the normalized data, min(X) and max(X) are the minimum and maximum values of the same type of data, and the range of the normalized data is [0, 1].
4. A thyroid disease progression time series analysis method based on LSTM network according to claim 3, characterized in that: The methods for outlier detection in step (2) include the z-score method based on statistics, the box plot method, and the isolation forest algorithm based on machine learning. The calculation formula of the z-score method is: Where z is the z-score value, X is the original data of the data point, μ is the mean of multiple original data of the same type, and σ is the standard deviation. When |z|>3, the original data of the data point is considered to be an outlier.
5. A thyroid disease progression time series analysis method based on LSTM network according to claim 3, characterized in that: Step (3) The methods for filling missing values in the time series set include mean filling, interpolation, forward filling and backward filling. The formula for mean filling is: Among them, X filled is the filled data, X i is the existence value, and N is the number of existence values.
6. A method for analyzing the time series of thyroid disease progression based on LSTM network according to claim 5, characterized in that: The LSTM network model is a deep neural network model including a model input layer, a network body and a model output layer, and is used to capture the time dependency in the course of thyroid disease; The model input layer receives time series data; the main body of the network uses three layers of LSTM units. The first layer is the unit input layer, and the number of nodes is the same as the feature dimension. The second and third layers are unit hidden layers, and the number of nodes are 128 and 64 respectively. Each layer of LSTM units contains a forget gate, input gate and output gate to control the flow of information. The internal activation function of the model uses a combination of sigmoid and tanh; the model output layer uses the ReLU function, and the Dropout mechanism is used to prevent overfitting; the model output layer is designed for multi-target prediction, including the predicted values of thyroid function indicators, nodule size change prediction values and disease risk scores in different time periods in the future.
7. A method for analyzing the time series of thyroid disease progression based on LSTM network according to claim 6, characterized in that: The LSTM network model in step 2 includes the following parts: Forget gate: controls the cell state C at the previous moment t-1 Whether it has been forgotten, the formula is: f t =σ(W f ·[h t-1 ,x t ]+b f ) Among them, f t is the output of the forget gate, W f is the weight matrix of the forget gate, h t-1 is the hidden state at the previous moment, x t is the current input, b f is the bias term of the forget gate. Input gate: determines the input x at the current moment t How much content needs to be updated to the cell state? The formula is: i t =σ(W i ·[h t-1 ,x t ]+b i ) Among them, i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate. Candidate memory cells: Generate candidate memory cells at the current moment The formula is: in, is a candidate memory unit, W c is the weight matrix of the candidate memory unit, b C is the bias term. Output gate: controls the cell state C t Output to hidden state h t The amount of information is: the t =σ(W o ·[h t-1 ,x t ]+b o ) Among them, t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate. Update cell state: Combine the output of the forget gate and the input gate to update the cell state C t , the formula is: Calculate the hidden state: Finally calculate the hidden state h at the current moment t , the formula is: h t =o t ·tanh(C t )。 8. The method for analyzing the time series of thyroid disease progression based on LSTM network according to claim 7, characterized in that: The training method of the LSTM network model in step 2 is as follows: a. Data preparation: Divide the data after the standardization process in step 1 into training set, validation set and test set, and use the data X′ of the training set as the current input x t To train the LSTM network model; b. Model training. During the training process, the time-based back-propagation algorithm is used to update the weights and bias items of the LSTM network. The Adam optimization algorithm or the RMSprop optimization algorithm is used to minimize the loss function. The loss function is expressed in mean square error, and its formula is: Among them, y i is the true value, is the model prediction value, and N is the number of samples. The update formula of the Adam optimization algorithm is: m t =β1m t-1 +(1-β1)g t Among them, m t and v t are the first-order and second-order moment estimates, g t is the gradient, α is the learning rate, and ε is a small constant to prevent division by zero errors; c. Model validation and tuning: Use validation set data to validate the model’s performance and optimize the model by adjusting hyperparameters; validation indicators include MSE, MAE, and R^2; d. After the model training is completed, the test set is used to perform a final evaluation of the model to verify its generalization ability on unseen data. The evaluation indicators of the test set also include MSE, MAE, and R^2.
Citation Information
Cited By
Air conditioner recommendation method and device based on LSTM model and air conditioner
CN120561514A