A machine learning-based thyroid disease classification prediction method

A thyroid disease classification and prediction model combining the LightGBM and SMOTE algorithms was developed. Relevant indicators were selected and a three-dimensional reference system of FT3, FT4, and TSH was constructed. This solved the problems of low accuracy and data imbalance in existing models and achieved high-precision thyroid disease classification and prediction.

CN117747112BActive Publication Date: 2026-08-25SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311831184.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2026-08-25
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

Existing thyroid disease classification and prediction models have low accuracy, small data volume, and lack independent validation. The model evaluation is not convincing, and the existing reference system fails to provide sufficiently accurate judgment criteria.

Method used

A thyroid disease classification and prediction model was constructed using the LightGBM algorithm. Data oversampling was performed using the SMOTE algorithm. Indicators were screened using the variance threshold method, Kruskal-Wallis test, and chi-square test to construct a minimum set of indicators. Relevant indicators were selected through mutual information scores to construct a three-dimensional reference system of FT3, FT4, and TSH.

Benefits of technology

It improves the accuracy and precision of thyroid disease classification and prediction, reduces the cost of obtaining indicators, solves the problem of data class imbalance, and provides more accurate judgment criteria.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117747112B_ABST
    Figure CN117747112B_ABST
Patent Text Reader

Abstract

The application discloses a thyroid disease prediction method based on machine learning, which comprises the following steps: S1, acquiring relevant sample data of a patient; S2, preprocessing the sample data to obtain processed sample data; S3, constructing a thyroid disease prediction model by using a LightGBM algorithm according to the processed sample data; S4, gradually reducing indexes and evaluating them on a test set to obtain a minimum index set; S5, reconstructing a model according to the index set; S6, analyzing test set data by using the model to obtain an analysis result; S7, judging whether the analysis result meets a preset condition, if yes, proceeding to step S8, otherwise, returning to step S1; S8, analyzing data of a to-be-detected person by using the model to obtain a prediction result; and S9, constructing a three-dimensional reference system of FT3, FT4 and TSH. The application can solve the problem of low accuracy of an existing thyroid disease prediction model and improve the three-dimensional reference system of FT3, FT4 and TSH.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical prediction technology, specifically to a machine learning-based method for classifying and predicting thyroid diseases. Background Technology

[0002] Thyroid dysfunction is a group of diseases involving abnormal levels of thyroid hormones, which can have serious effects on human health. Hyperthyroidism and hypothyroidism are the two most common conditions. Hyperthyroidism causes the body's metabolism to be too fast, which may lead to symptoms such as rapid heartbeat, weight loss, anxiety, and excessive sweating. Hypothyroidism, on the other hand, causes a decreased metabolic rate, which may result in symptoms such as weight gain, fatigue, dry skin, and low mood. In addition, subclinical thyroid dysfunction is a more insidious condition, characterized by slightly abnormal thyroid hormone levels that do not yet present with typical hyperthyroidism or hypothyroidism. Although the symptoms are not obvious, it can still have some impact on a patient's cardiovascular health, bone density, and quality of life.

[0003] Existing studies on thyroid disease classification mostly have low accuracy (below 0.95), resulting in poor model performance. Furthermore, some studies use very small datasets (less than 500 data points), and even if they achieve high assessment scores, the limited data and lack of independent validation render their model evaluations unconvincing. In addition, some better-performing models employ a large number of indicators for prediction, leading to higher costs.

[0004] Furthermore, in the process of classifying and predicting thyroid diseases, the blood levels of three substances, FT3, FT4, and TSH, have a significant impact on the classification results. However, the reference systems for these three substances currently used in clinical practice are relatively outdated and fail to provide sufficiently accurate judgment criteria. Summary of the Invention

[0005] To address the aforementioned shortcomings in the existing technology, this invention provides a machine learning-based method for classifying and predicting thyroid diseases.

[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: A machine learning-based method for classifying and predicting thyroid diseases includes the following steps: S1: Obtain relevant sample data of patients; S2: Preprocess the relevant sample data to obtain preprocessed relevant sample data; S3: Based on the preprocessed relevant sample data, construct a thyroid disease classification and prediction model using the LightGBM algorithm; S4: Gradually reduce the number of indicators, construct a thyroid disease classification and prediction model, and analyze the test set data to obtain the minimum set of indicators and the relevant sample data after screening; S5: Based on the minimum set of indicators and the filtered relevant sample data, construct a thyroid disease classification and prediction model using the LightGBM algorithm; S6: Analyze the test set data using the thyroid disease classification and prediction model to obtain the analysis results; S7: Determine whether the analysis result meets the preset conditions. If yes, proceed to step S8; otherwise, return to step S1. S8: Analyze the relevant data of the patients to be tested using the thyroid disease classification prediction model to obtain the prediction results; S9: Construct a three-dimensional reference system covering the value ranges of FT3, FT4, and TSH for each category of substances.

[0007] Furthermore, step S2 includes: S21: Clean and organize the relevant sample data to obtain diagnostic data; S22: Oversample the diagnostic data using the SMOTE algorithm to obtain oversampled diagnostic data; S23: Use the variance threshold method to filter the continuous indicators of the diagnosis and treatment data to obtain the filtered continuous indicator data; S24: Use the Kruskal-Wallis test to screen the continuous indicators of the diagnosis and treatment data to obtain continuous indicator data with significant inter-class differences; S25: Use the chi-square test to screen the categorical indicators of the diagnosis and treatment data to obtain categorical indicator data that are significantly related to the category, and merge them with the screened continuous indicator data to obtain the screened indicator data. S26: Introduce indicator data that are highly correlated with the classification and prediction of thyroid diseases using mutual information scores.

[0008] Furthermore, step S21 includes: S211: Delete columns in the relevant sample data whose logical judgments have no effect on the results and whose missing values ​​exceed 50%, to obtain the deleted relevant sample data; S212: Convert the categorical features in the deleted relevant sample data into numerical representations to obtain the converted relevant sample data; S213: For the transformed relevant sample data, fill the missing values ​​using the median of the same category of sample data to obtain the diagnosis and treatment data.

[0009] Furthermore, step S22 includes: S221: Input the diagnosis and treatment data into the SMOTE algorithm, and generate new synthetic samples according to the k_neighbors parameter of the current SMOTE algorithm to increase the number of minority class samples; S222: Randomly sample and check whether the synthesized sample meets the judgment result of clinical experience. If so, output the relevant sample data after synthesis; otherwise, gradually adjust the k_neighbors parameter of the SMOTE algorithm and return to step S221.

[0010] Furthermore, step S23 includes: S231: Calculate the variance of the current index in the continuous index of the diagnostic and treatment data; S232: Determine whether the variance is less than a preset threshold. If yes, delete the current index in the continuous indicators of the diagnosis and treatment data. Otherwise, retain the current index in the continuous indicators of the diagnosis and treatment data to obtain the filtered continuous indicator data.

[0011] Furthermore, step S26 includes: S261: Calculate the mutual information score between the filtered indicator data and the category labels, and sort the results in descending order; For continuous variables, the formula for calculating mutual information is:

[0012] For categorical variables, the formula for calculating mutual information is:

[0013] S262: Select the top m index data, where m is a preset index threshold, to be used as the preprocessed relevant sample data output.

[0014] Furthermore, step S4 includes: S41: Use the preprocessed relevant sample data described in the LightGBM algorithm to train and obtain a thyroid disease classification and prediction model; S42: Analyze the test set data using the thyroid disease classification and prediction model to obtain the analysis results; S43: Determine whether the analysis results meet the preset conditions. If yes, delete the indicator with the lowest mutual information score among the existing indicators to obtain the filtered indicator data, and then obtain the corresponding processed relevant sample data. Re-enter step S41. Otherwise, retain the indicator data deleted in the previous step, remove the indicator with the second lowest mutual information score among the existing remaining indicators to obtain the filtered indicator data, and then obtain the corresponding processed relevant sample data. Re-enter step S41 until all remaining indicators are indicator data that need to be retained, which is the minimum indicator set, and obtain the relevant sample data filtered by the minimum indicator set.

[0015] Furthermore, step S9 includes: S91: Using the ordination statistics method, the percentile positions are adjusted to estimate the value ranges of the three substances FT3, FT4, and TSH in the sample data, and a three-dimensional reference system is constructed. S92: Using the kernel density estimation method and Gaussian mixture model fitting method, the screening threshold of the high-density probability region is adjusted, and the population is estimated by using the value range of FT3, FT4 and TSH in the sample data, and a three-dimensional reference system is constructed. S93: Use the test set data to test the three-dimensional reference system and determine whether the test results meet the preset conditions. If yes, proceed to step S95; otherwise, gradually adjust the values ​​of the key parameters of each method and return to step S91. S94: Compare the interval probabilities of the test set data in the three-dimensional reference systems obtained by each method, and select the best reference systems for FT3, FT4, and TSH respectively.

[0016] Furthermore, step S91 includes: S911: Classify the filtered sample data according to the labels and sort them within each category; S912: Set the percentile positions to 2.5% and 97.5%, determine the positions in the sorted sample data, and construct 95% confidence intervals for FT3, FT4, and TSH.

[0017] Furthermore, step S92 includes: S921: Classify the filtered sample data according to the labels, and use the kernel density estimation method and Gaussian mixture model to calculate the probability density estimates of FT3, FT4 and TSH for each category respectively; S922: Set the screening threshold for high-density probability regions to obtain the screened high-density probability regions, which are the three-dimensional reference systems of FT3, FT4, and TSH.

[0018] The present invention has the following beneficial effects: (1) This invention predicts the category of thyroid diseases based on the patient's basic information, blood tests and biochemical indicators and thyroid function indicators. It is innovative in terms of data. The established prediction model can provide more accurate data support for the prediction results of thyroid diseases. This invention has the advantages of intelligence and high prediction accuracy.

[0019] (2) This invention reduces the number of variables used for prediction to two, which significantly reduces the cost of obtaining relevant indicators.

[0020] (3) The present invention utilizes the SMOTE algorithm to solve the model training error caused by data class imbalance to a certain extent and improve the accuracy of model training. Attached Figure Description

[0021] Figure 1 This is a flowchart of the machine learning-based thyroid disease classification and prediction method of the present invention. Detailed Implementation

[0022] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0023] The following is an explanation of the definitions of abbreviations and key terms in this invention: Thyroid diseases: refer to a series of diseases involving abnormal thyroid hormone levels. The thyroid diseases involved in this invention include four categories: hyperthyroidism, hypothyroidism, subclinical hyperthyroidism, and subclinical hypothyroidism.

[0024] FT3: Free triiodothyronine, is a form of thyroid hormone that plays a role in regulating metabolism and maintaining cardiovascular, nerve, and muscle function. The concentration of FT3 in the blood is one of the important indicators for assessing thyroid function.

[0025] FT4: Free thyroxine refers to the level of thyroxine in the blood that is free and not bound to proteins. It has important effects on the body's metabolism, protein synthesis, and the function of the nervous and cardiovascular systems. The level of free thyroxine in the blood is often used to assess whether thyroid function is normal and is one of the important indicators for diagnosing thyroid-related diseases.

[0026] TSH: Thyroid-stimulating hormone, is a hormone secreted by the pituitary gland that regulates the synthesis and release of thyroid hormones. When thyroid hormone levels in the blood are too low, the pituitary gland releases more TSH to stimulate the thyroid gland, causing it to increase the synthesis and release of thyroid hormones. Conversely, if thyroid hormone levels are too high, the pituitary gland will reduce TSH release. Measuring blood TSH levels is one of the important methods for assessing thyroid function. Abnormal TSH levels may indicate thyroid dysfunction, which is helpful in diagnosing thyroid diseases.

[0027] LightGBM: LightGBM is a high-efficiency gradient boosting machine learning model. It features a histogram-based splitting technique, offering fast training speed, low memory usage, distributed computing support, powerful feature engineering capabilities, and a wide range of applications.

[0028] SMOTE (Synthetic Minority Over-sampling Technique) is a technique for handling imbalanced datasets. It improves model performance by generating synthetic minority class samples to balance the class distribution. Based on the distance relationships between minority class samples, it synthesizes new samples, enabling the model to better identify and learn the minority class, thus improving classification performance.

[0029] Accuracy: refers to the proportion of samples correctly predicted by the model out of the total number of samples.

[0030]

[0031] Precision: The proportion of samples that the model predicts as belonging to a certain class, but which actually belong to that class. For multi-class classification tasks, evaluation metrics typically require calculating precision, recall, and F1 score separately for each class, and then averaging them to obtain a global performance measure. Macro-averaging calculates the metric independently for each class and then averages it, treating the performance of each class equally. After comprehensive evaluation, it is considered more suitable for experimental requirements, so this project uses precision calculated using macro-averaging as the evaluation metric. The same applies to recall and F1 score.

[0032]

[0033] Recall: The proportion of samples that actually belong to a certain category that the model successfully predicts as belonging to that category.

[0034]

[0035] F1 score: A metric that takes into account both precision and recall; it is the harmonic mean of precision and recall.

[0036]

[0037] This invention provides a machine learning-based method for classifying and predicting thyroid diseases, with reference to... Figure 1 As shown, the machine learning-based thyroid disease classification and prediction method includes: S1: Obtain relevant sample data of patients; The relevant sample data of patients obtained in this invention includes patients' biochemical indicators and thyroid function indicators. These indicator sample data are obtained by collecting blood samples from patients, processing them through centrifugation, and then analyzing the blood using blood component analysis instruments, spectral analysis instruments, and other methods. In addition, the relevant sample data of patients obtained in this invention also includes the patients' basic information.

[0038] S2: Preprocess the relevant sample data to obtain preprocessed relevant sample data; Specifically, step S2 includes: S21: Clean and organize the relevant sample data to obtain diagnostic data; Here, in order to obtain relatively clean data and reduce the complexity of subsequent processing, the present invention first performs a deletion operation on columns in the sample data where the logical judgment has no impact on the result and columns with more than 50% missing values, namely S211: perform a deletion operation on columns in the relevant sample data where the logical judgment has no impact on the result and columns with more than 50% missing values, to obtain the deleted relevant sample data; Meanwhile, in order to improve model performance, it is also necessary to encode the categorical variables in the deleted sample data into numerical types, that is, S212: convert the categorical features in the deleted related sample data into numerical representations to obtain the converted related sample data; In addition, in order to meet the requirement of no missing values ​​in the sample data for oversampling in the SMOTE algorithm, it is also necessary to fill missing values, that is, S213: fill missing values ​​in the transformed relevant sample data using the median of the same category of sample data to obtain the diagnosis and treatment data.

[0039] S22: Oversample the diagnostic data using the SMOTE algorithm to obtain oversampled diagnostic data; Specifically, step S22 includes: S221: Input the diagnosis and treatment data into the SMOTE algorithm, and generate new synthetic samples according to the k_neighbors parameter of the current SMOTE algorithm to increase the number of minority class samples; S222: Randomly sample and check whether the synthesized sample meets the judgment result of clinical experience. If so, output the relevant sample data after synthesis; otherwise, gradually adjust the k_neighbors parameter of the SMOTE algorithm and return to step S221.

[0040] S23: Use the variance threshold method to filter the continuous indicators of the diagnosis and treatment data to obtain the filtered continuous indicator data; Specifically, step S23 includes: S231: Calculate the variance of the current index in the continuous index of the diagnostic and treatment data; S232: Determine whether the variance is less than a preset threshold. If yes, delete the current index in the continuous index of the diagnosis and treatment data. Otherwise, retain the current index in the continuous index of the diagnosis and treatment data to obtain the filtered continuous index data. The present invention presets a variance threshold of 3, and considers that indicators with a variance less than this threshold to contain less information, and deletes these indicators.

[0041] S24: Use the Kruskal-Wallis test to screen the continuous indicators of the diagnosis and treatment data to obtain continuous indicator data with significant inter-class differences; S25: Use the chi-square test to screen the categorical indicators of the diagnosis and treatment data to obtain categorical indicator data that are significantly related to the category, and merge them with the screened continuous indicator data to obtain the screened indicator data. S26: Introduce indicator data that are highly correlated with the classification and prediction of thyroid diseases using mutual information scores; Specifically, step S26 includes: S261: Calculate the mutual information score between the filtered indicator data and the category labels, and sort the results in descending order; For continuous variables, the formula for calculating mutual information is:

[0042] For categorical variables, the formula for calculating mutual information is:

[0043] S262: Select the top m index data (m is a preset index threshold) as the output of the preprocessed relevant sample data.

[0044] The present invention sets an initial threshold of 10 for the number of indicators, assuming that the top 10 indicators in terms of mutual information have a higher degree of information sharing and stronger correlation with the labels, and uses this as the initial indicator for building the LightGBM model.

[0045] S3: Based on the preprocessed relevant sample data, construct a thyroid disease classification and prediction model using the LightGBM algorithm; S4: Gradually reduce the number of indicators, construct a thyroid disease classification prediction model, analyze the test set data, and obtain the minimum set of indicators and the relevant sample data after screening; Specifically, step S4 includes: S41: Use the preprocessed relevant sample data described in the LightGBM algorithm to train and obtain a thyroid disease classification and prediction model; S42: Analyze the test set data using the thyroid disease classification and prediction model to obtain the analysis results; S43: Determine whether the analysis results meet the preset conditions. If yes, delete the indicator with the lowest mutual information score among the existing indicators to obtain the filtered indicator data, and then obtain the corresponding processed relevant sample data, and re-enter step S41. Otherwise, retain the indicator data deleted in the previous step, remove the indicator with the second lowest mutual information score from the remaining indicators to obtain the filtered indicator data, and then obtain the corresponding processed relevant sample data, and re-enter step S41. Continue until all remaining indicators are the indicator data that need to be retained, which is the minimum indicator set, and obtain the relevant sample data filtered by the minimum indicator set.

[0046] This invention uses the accuracy of test data to measure the model's performance during the feature selection process, with a preset condition of accuracy > 0.95. That is, if the existing model's accuracy reaches above 95% during the gradual reduction of features, and the model's accuracy drops below 95% when the number of features is further reduced, it indicates that feature reduction can be stopped at this point.

[0047] S5: Based on the minimum set of indicators and the filtered relevant sample data, construct a thyroid disease classification and prediction model using the LightGBM algorithm; S6: Analyze the test set data using the thyroid disease classification and prediction model to obtain the analysis results; S7: Determine whether the analysis result meets the preset conditions. If yes, proceed to step S8; otherwise, return to step S1. This invention uses the accuracy, precision, recall, and F1 score of test data to measure the final performance of the model, with the following preset conditions: Accuracy > 0.95 Macro-Averaged Precision > 0.95 Macro-Averaged Recall > 0.95 Macro-Averaged F1-Score > 0.95 S8: Analyze the relevant data of the patients to be tested using the thyroid disease classification prediction model to obtain the prediction results; S9: Construct a three-dimensional reference system covering the value ranges of FT3, FT4, and TSH for each category of substances.

[0048] Specifically, step S9 includes: S91: Using the ordination statistics method, the percentile positions are adjusted to estimate the value ranges of the three substances FT3, FT4, and TSH in the sample data, and a three-dimensional reference system is constructed. Specifically, step S91 includes: S911: Classify the filtered sample data according to the labels and sort them within each category; S912: Set the percentile positions to 2.5% and 97.5%, determine the positions in the sorted sample data, and construct 95% confidence intervals for FT3, FT4, and TSH.

[0049] S92: Using the kernel density estimation method, the screening threshold of the high-density probability region is adjusted, and the population is estimated by using the value range of the three substances FT3, FT4 and TSH in the sample data, and a three-dimensional reference system is constructed. Specifically, step S92 includes: S921: Classify the filtered sample data according to the labels, and use the kernel density estimation method to calculate the probability density estimates of FT3, FT4 and TSH for each category respectively; S922: Set the screening threshold for high-density probability regions to obtain the screened high-density probability regions, which are the three-dimensional reference systems of FT3, FT4, and TSH.

[0050] This invention sets the screening threshold for high-density probability regions to 0.01, that is, it selects the portion of other data points in the entire dataset fitted by the model whose probability density exceeds 99%, as the range of values ​​for FT3, FT4, and TSH, thereby focusing on the most likely part of the data and ignoring those extreme values ​​or outliers with lower probability density.

[0051] S93: Using the Gaussian mixture model fitting method, the screening threshold of the high-density probability region is adjusted, and the population is estimated by using the value range of the three substances FT3, FT4 and TSH in the sample data, and a three-dimensional reference system is constructed. Specifically, step S93 includes: S931: Classify the filtered sample data according to the labels, and use the Gaussian mixture model to calculate the probability density estimates of FT3, FT4 and TSH for each category respectively; S932: Set the screening threshold for high-density probability regions to obtain the screened high-density probability regions, which are the three-dimensional reference systems of FT3, FT4, and TSH.

[0052] This invention sets the screening threshold for high-density probability regions to 0.01, that is, it selects the portion of other data points in the entire dataset fitted by the model whose probability density exceeds 99%, as the range of values ​​for FT3, FT4, and TSH, thereby focusing on the most likely part of the data and ignoring those extreme values ​​or outliers with lower probability density.

[0053] S94: Use the test set data to examine the three-dimensional reference system and determine whether the examination results meet the preset conditions. If yes, proceed to step S95; otherwise, gradually adjust the values ​​of the key parameters of each method (i.e., the percentile position and the screening threshold of the high-density probability region) and return to step S91. Specifically, in step S94, the preset condition is: The interval probability is greater than 0.85, where the interval probability refers to the probability that the test data is within the reference system.

[0054] S95: Compare the interval probabilities of the test set data in the three-dimensional reference systems obtained by each method, and select the best reference systems for FT3, FT4, and TSH respectively.

[0055] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0056] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0057] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0058] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

[0059] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A machine learning-based method for classifying and predicting thyroid diseases, characterized in that, Includes the following steps: S1: Obtain relevant sample data of patients; S2: Preprocess the relevant sample data to obtain preprocessed relevant sample data, specifically including: S21: Clean and organize the relevant sample data to obtain diagnostic data; S22: Oversample the diagnostic data using the SMOTE algorithm to obtain oversampled diagnostic data; S23: Use the variance threshold method to filter the continuous indicators of the diagnosis and treatment data to obtain the filtered continuous indicator data; S24: Use the Kruskal-Wallis test to screen the continuous indicators of the diagnosis and treatment data to obtain continuous indicator data with significant inter-class differences; S25: Use the chi-square test to screen the categorical indicators of the diagnosis and treatment data to obtain categorical indicator data that are significantly related to the category, and merge them with the screened continuous indicator data to obtain the screened indicator data. S26: Introduce indicator data with high correlation to thyroid disease classification prediction using mutual information scores, specifically including: S261: Calculate the mutual information score between the filtered indicator data and the category labels, and sort the results in descending order; For continuous variables, the formula for calculating mutual information is: Where x represents the filtered continuous indicator data, and y represents the classification label data of thyroid diseases; For categorical variables, the formula for calculating mutual information is: Where x represents the filtered categorical indicator data, and y represents the categorical label data for thyroid diseases; S262: Select the top m index data, where m is a preset index threshold, to be used as the preprocessed relevant sample data output; S3: Based on the preprocessed relevant sample data, construct a thyroid disease classification and prediction model using the LightGBM algorithm; S4: Gradually reduce the number of indicators, construct a thyroid disease classification and prediction model, and analyze the test set data to obtain the minimum set of indicators and the relevant sample data after screening; S5: Based on the minimum set of indicators and the filtered relevant sample data, construct a thyroid disease classification and prediction model using the LightGBM algorithm; S6: Analyze the test set data using the thyroid disease classification and prediction model to obtain the analysis results; S7: Determine whether the analysis result meets the preset conditions. If yes, proceed to step S8; otherwise, return to step S1. S8: Analyze the relevant data of the patients to be tested using the thyroid disease classification prediction model to obtain prediction results; S9: Construct a three-dimensional reference system covering the value ranges of FT3, FT4, and TSH for each category of substances.

2. The machine learning-based thyroid disease classification and prediction method according to claim 1, characterized in that, Step S21 includes: S211: Delete columns in the relevant sample data whose logical judgments have no effect on the results and whose missing values ​​exceed 50%, to obtain the deleted relevant sample data; S212: Convert the categorical features in the deleted relevant sample data into numerical representations to obtain the converted relevant sample data; S213: For the transformed relevant sample data, fill the missing values ​​using the median of the same category of sample data to obtain the diagnosis and treatment data.

3. The machine learning-based thyroid disease classification and prediction method according to claim 1, characterized in that, Step S22 includes: S221: Input the diagnosis and treatment data into the SMOTE algorithm, and generate new synthetic samples according to the k_neighbors parameter of the current SMOTE algorithm to increase the number of minority class samples; S222: Randomly sample and check whether the synthesized sample meets the judgment result of clinical experience. If so, output the relevant sample data after synthesis; otherwise, gradually adjust the k_neighbors parameter of the SMOTE algorithm and return to step S221.

4. The machine learning-based thyroid disease classification and prediction method according to claim 1, characterized in that, Step S23 includes: S231: Calculate the variance of the current index in the continuous index of the diagnostic and treatment data; S232: Determine whether the variance is less than a preset threshold. If yes, delete the current index in the continuous indicators of the diagnosis and treatment data. Otherwise, retain the current index in the continuous indicators of the diagnosis and treatment data to obtain the filtered continuous indicator data.

5. The machine learning-based thyroid disease classification and prediction method according to claim 1, characterized in that, Step S4 includes: S41: Use the preprocessed relevant sample data described in the LightGBM algorithm to train and obtain a thyroid disease classification and prediction model; S42: Analyze the test set data using the thyroid disease classification and prediction model to obtain the analysis results; S43: Determine whether the analysis results meet the preset conditions. If yes, delete the indicator with the lowest mutual information score among the existing indicators to obtain the filtered indicator data, and then obtain the corresponding processed relevant sample data. Re-enter step S41. Otherwise, retain the indicator data deleted in the previous step, remove the indicator with the second lowest mutual information score among the existing remaining indicators to obtain the filtered indicator data, and then obtain the corresponding processed relevant sample data. Re-enter step S41 until all remaining indicators are indicator data that need to be retained, which is the minimum indicator set, and obtain the relevant sample data filtered by the minimum indicator set.

6. The machine learning-based thyroid disease classification and prediction method according to claim 1, characterized in that, Step S9 includes: S91: Using the ordination statistics method, the percentile positions are adjusted to estimate the value ranges of the three substances FT3, FT4, and TSH in the sample data, and a three-dimensional reference system is constructed. S92: Using the kernel density estimation method and Gaussian mixture model fitting method, the screening threshold of the high-density probability region is adjusted, and the population is estimated by using the value range of FT3, FT4 and TSH in the sample data, and a three-dimensional reference system is constructed. S93: Use the test set data to test the three-dimensional reference system and determine whether the test results meet the preset conditions. If yes, proceed to step S95; otherwise, gradually adjust the values ​​of the key parameters of each method and return to step S91. S94: Compare the interval probabilities of the test set data in the three-dimensional reference systems obtained by each method, and select the best reference systems for FT3, FT4, and TSH respectively.

7. The machine learning-based thyroid disease classification and prediction method according to claim 6, characterized in that, Step S91 includes: S911: Classify the filtered sample data according to the labels and sort them within each category; S912: Set the percentile positions to 2.5% and 97.5%, determine the positions in the sorted sample data, and construct 95% confidence intervals for FT3, FT4, and TSH.

8. The machine learning-based thyroid disease classification and prediction method according to claim 1, characterized in that, Step S92 includes: S921: Classify the filtered sample data according to the labels, and use the kernel density estimation method and Gaussian mixture model to calculate the probability density estimates of FT3, FT4 and TSH for each category respectively; S922: Set the screening threshold for high-density probability regions to obtain the screened high-density probability regions, which are the three-dimensional reference systems of FT3, FT4, and TSH.