Crohn disease auxiliary prediction method and device based on machine learning
The Crohn's disease-assisted prediction method using machine learning, which utilizes the XGBoost model for adaptive data completion and prediction, overcomes the shortcomings of traditional diagnostic methods and achieves accurate prediction of Crohn's disease risk and efficient diagnosis and treatment.
Patent Information
- Application Number
- CN202511438342.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2026-02-24
AI Technical Summary
Current diagnostic methods for Crohn's disease rely on traditional medical examinations and clinical experience, making it impossible to conduct self-assessments when there are no obvious lesions or symptoms. High-end equipment and expert experience limit the accessibility of primary healthcare, and medical examinations are cumbersome and invasive for patients, making frequent follow-up examinations and dynamic monitoring difficult.
A machine learning-based Crohn's disease-assisted prediction method is adopted. By acquiring user data, adaptive completion and missing item imputation are performed, and the XGBoost model is used for prediction. The results are then visualized.
It improves the accuracy of Crohn's disease risk prediction and the efficiency of diagnosis and treatment, allowing users to detect relevant risks in a timely manner, reducing reliance on high-end equipment and expert experience, and increasing the accessibility of primary healthcare.
Smart Images

Figure CN121565478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of machine learning and intelligent diagnosis and treatment, and in particular to a machine learning-based method and device for assisting in the prediction of Crohn's disease. Background Technology
[0002] Currently, the diagnosis of Crohn's disease usually relies on a combination of traditional medical examinations and clinical experience. This involves making an initial judgment based on the patient's medical history, typical symptoms such as abdominal pain, diarrhea, and weight loss. After that, the patient needs to undergo a series of comprehensive examinations at the hospital, and then the doctor makes a judgment based on personal experience and by integrating multi-dimensional information.
[0003] The problems with the above methods include: patients cannot conduct self-assessment to discover hidden risks of disease when there are no obvious lesions or symptoms; high-end equipment and expert experience limit the accessibility of primary healthcare; diagnostic levels vary significantly in different regions; medical examinations are cumbersome for patients to perform, and some are invasive procedures; patient compliance is poor, and it is difficult to have frequent follow-up examinations for dynamic monitoring.
[0004] Therefore, there is a need for a method that can assist in the prediction of Crohn's disease based on the patient's existing indicators, so that users can easily identify relevant risks in a timely manner, seize the best treatment opportunity, and improve the efficiency of diagnosis and treatment. Summary of the Invention
[0005] The purpose of this invention is to at least address one of the shortcomings of the prior art and provide a machine learning-based method for assisting in the prediction of Crohn's disease.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: Specifically, a machine learning-based method for assisting in the prediction of Crohn's disease is proposed, including the following: Obtain user-related prediction data; Determine if there are missing items in the user's relevant prediction data. If so, alert the user to supplement them. If the user confirms that they cannot supplement them, perform adaptive completion to finally form the data to be predicted. The data to be predicted is input into a pre-established Crohn's disease auxiliary prediction model, and the Crohn's disease auxiliary prediction model outputs the prediction result. The Crohn's disease auxiliary prediction model is built based on the XGBoost model; The prediction results are then visualized and presented to the user.
[0007] Furthermore, specifically, the process of adaptively completing user-related predictive data includes: The system performs field matching on user-related prediction data according to a preset template. When there are missing fields or missing items, the data is supplemented by the median of the historical data corresponding to the missing fields to form the data to be predicted.
[0008] Furthermore, specifically, the process of adaptively completing user-related predictive data includes: The system performs field matching on user-related prediction data according to a preset template. When a missing field (i.e., a missing item) is found... The missing items in the preset template are identified, and the Euclidean distance of the missing items with preset weights is calculated in the pre-established sample library. The complete sample set with Euclidean distance less than the first threshold is found. If the complete sample set is empty, the sample with the smallest Euclidean distance is found and the missing items are filled with the corresponding data in the sample. If the complete sample set is not empty, the missing items are filled with the average value of the corresponding data in the complete sample set to form the data to be predicted.
[0009] Furthermore, specifically, the acquisition of training samples for the pre-established Crohn's disease auxiliary prediction model includes, The ADASYN algorithm is used to oversample the Crohn's disease minority class samples in the training data. The steps are as follows: Step 1: Set the number of samples to be synthesized according to requirements. ; Step 2: For each minority class sample Find its vicinity based on Euclidean distance. Find the K nearest neighbor samples and calculate the proportion of the majority class samples among the K nearest neighbor samples: , (1); in, This refers to the number of minority class samples, i.e., the number of Crohn's cases; It is a sample The number of samples belonging to the majority class among the K nearest neighbors. The value range of is [0, 1]; Step 3: [The sentence is incomplete and requires more context.] The standardization is as follows: (2); Step 4: Calculate each sample Number of synthetic samples to be generated : (3); Step 5: From After calculating the number of minority class samples needed, use the following formula to generate new synthetic minority class samples. , (4); in, This represents a newly generated minority class sample; Represents the original minority class sample; A random number between 0 and 1; This represents a randomly selected nearest neighbor sample.
[0010] Furthermore, specifically, the calculation process for the predicted values of the pre-established Crohn's disease auxiliary prediction model includes: sample final predicted value The scores of all decision tree nodes are summed: (5); Where K is the number of iterations of the decision tree; For the first The score obtained by each decision leaf node; For data sample numbers; This is the decision tree sequence number.
[0011] Furthermore, specifically, the pre-established Crohn's disease-assisted prediction model obtains the score of each tree in the model by setting an objective function for each decision tree. The loss function in the objective function is expanded using the Taylor second-order formula, and the complexity function is iterated. The simplified objective function is shown in the following equation: (6); in, The set of all training samples indexed by the leaf node j; and For the loss function of the tree The first and second derivatives; T is the number of leaf nodes in the current tree; γ is the penalty term for the number of nodes; For the first The score obtained from each node; λ is the L2 regularization penalty term used to control the generalization error of the model and prevent overfitting.
[0012] Furthermore, specifically, the pre-established Crohn's disease-assisted prediction model uses a criterion based on the objective function gain to decide whether to split a node during the construction of a single tree. For example, it might split the current node N into a left child node L and a right child node R: (7); in, It is the first gradient of all samples falling into the left child node L. sum; It is the second gradient of all samples falling into the left child node L. sum; It is the first gradient of all samples falling into the right child node R. sum; It is the second gradient of all samples falling into the right child node R. sum; These represent the sets of samples that fall into the left and right child nodes after the split, respectively. It is the same leaf node complexity penalty coefficient as in the objective function; It is the same L2 regularization coefficient as in the objective function; calculate the Gain corresponding to all possible split points, i.e., feature + threshold, and select the split point that maximizes the Gain for splitting. If the maximum Gain is less than 0, or compared with 0, or if... If the node does not split, it will become a leaf node.
[0013] Furthermore, specifically, the pre-established Crohn's disease-assisted prediction model optimizes binary classification tasks by introducing a class weight scaling factor at the loss function level. When the ratio of positive to negative samples in the training data is severely imbalanced, the model's process of optimizing the objective function through gradient descent naturally tends to favor the majority class problem. The formula for calculating the class weight scaling factor is: (8); in, It is the number of Crohn's case samples in the training set, i.e., the number of samples with a label of 0; It is the number of normal samples in the training set, i.e., the number of samples with a label of 1.
[0014] Globally amplify the loss term for positive samples. By amplifying the contribution of minority class samples in the objective function optimization process, the model promotes a balance between the total contribution of positive samples and negative samples to the objective function, making the model pay more attention to the minority class and thus improving its recognition ability.
[0015] This invention also proposes a machine learning-based Crohn's disease auxiliary prediction device, comprising the following: The data acquisition module is used to acquire relevant prediction data from users; The data completion module is used to determine whether there are missing items in the user's relevant prediction data. If there are, an alarm will be issued to remind the user to fill them in. If the user confirms that they cannot fill them in, adaptive completion will be performed to finally form the data to be predicted. The result prediction module is used to input the data to be predicted into a pre-established Crohn's disease auxiliary prediction model, and the Crohn's disease auxiliary prediction model outputs the prediction result. The Crohn's disease auxiliary prediction model is built based on the XGBoost model; The visualization module is used to visualize and display the prediction results to inform the user.
[0016] The beneficial effects of this invention are as follows: This invention proposes a machine learning-based method and device for Crohn's disease assisted prediction. A Crohn's disease assisted prediction model is constructed based on the XGBoost algorithm, and this model is used to predict the risk of Crohn's disease based on relevant user data. On one hand, when user input data is missing, the user is prompted to supplement it; if supplementation is not possible, adaptive completion is performed to improve the model's prediction accuracy. On the other hand, the Crohn's disease assisted prediction model constructed using XGBoost has the highest prediction accuracy compared to other machine learning models. This invention can predict the risk of Crohn's disease based on the patient's existing indicators, enabling users to promptly identify relevant risks, thereby seizing the optimal treatment opportunity and improving the efficiency of diagnosis and treatment. Attached Figure Description
[0017] The above and other features of this disclosure will become more apparent from the detailed description of the embodiments illustrated in conjunction with the accompanying drawings. In the accompanying drawings, the same reference numerals denote the same or similar elements. Obviously, the drawings described below are merely some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings: Figure 1 The flowchart shown is a machine learning-based auxiliary prediction method for Crohn's disease according to the present invention. Figure 2 The image shows a mobile terminal UI interface for acquiring user-related prediction data in an application example of the present invention. Figure 3 The image shows the UI interface for visualizing the prediction results of this invention in an application example. Figure 4 The image shows the UI of the alarm notification when there is a missing item in an application instance of the present invention; Figure 5 The figure shows a comparison of the results of the proposed method with other existing machine learning algorithms when applying full features; Figure 6 The figure shows a comparison of the results of the proposed method with other existing machine learning algorithms in IUS applications; Figure 7 The figure shows a comparison of the results of the proposed method with other existing machine learning algorithms when applying the combination of full features and IUS. Detailed Implementation
[0018] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The same reference numerals used throughout the accompanying drawings indicate the same or similar parts.
[0019] Example 1, referring to Figure 1 This invention proposes a machine learning-based method for assisting in the prediction of Crohn's disease, comprising the following: Step 110: Obtain user-related prediction data; Step 120: Determine if there are any missing items in the user's relevant prediction data. If so, alert the user to supplement them. If the user confirms that they cannot supplement them, perform adaptive completion to finally form the data to be predicted. Step 130: Input the data to be predicted into the pre-established Crohn's disease auxiliary prediction model, and the Crohn's disease auxiliary prediction model outputs the prediction result; The Crohn's disease auxiliary prediction model is built based on the XGBoost model; Step 140: Visualize and display the prediction results to inform the user.
[0020] In this embodiment 1, a Crohn's disease auxiliary prediction model is constructed based on the XGBoost algorithm. This model is used to predict the risk of Crohn's disease based on user-related prediction data. On the one hand, when user input data is missing, the user is prompted to supplement it; if it cannot be supplemented, adaptive completion is performed to improve the model's prediction accuracy. On the other hand, the Crohn's disease auxiliary prediction model constructed using XGBoost has the highest prediction accuracy compared to other machine learning models. This invention can predict the risk of Crohn's disease based on the patient's existing indicators, enabling users to promptly identify relevant risks, thereby seizing the best treatment opportunity and improving the efficiency of diagnosis and treatment.
[0021] Reference Figure 2 as well as Figure 3 As an application example, the user fills in the relevant information according to the field information prompted on the mobile interface, and after clicking "Start Analysis", the pre-trained model is called, and then feedback is given based on the recognition probability of Crohn's disease.
[0022] Reference Figure 4 When the information entered by the user is incomplete, the system will remind the user which fields are missing and inform them that this may affect the accuracy of the model analysis. After clicking "Start Analysis", the system will automatically use the median of the historical data of the missing fields as a supplement, so that the model can run normally and minimize the impact of missing data.
[0023] Furthermore, the method proposed in this invention is verified through result analysis using the following methods. The indicators are divided into three parts: basic characteristics, ultrasound characteristics, and multimodal characteristics, as detailed in Table 1 below. Table 1 Feature Classification
[0024] This study employed a retrospective design, selecting clinical data from * to * time points, with a total sample size of 1119 cases, including 178 cases in the Crohn's disease group and 941 cases in the normal control group.
[0025] The original data was divided into training and test sets in an 8:2 ratio. For the training set, Crohn's disease group sample data was further expanded using ADASYN oversampling. After processing, the number of samples in the Crohn's disease group was 540, and the number of samples in the normal control group was 753. For the test set, to improve the robustness of the model in identifying Crohn's disease, 17 representative Crohn's cases from * to * were added, resulting in a total of 241 test samples, of which 53 were in the Crohn's disease group and 188 were in the normal control group.
[0026] Regarding model settings, the model parameters were determined through grid search and 5-fold cross-validation optimization, and mainly include the following key settings: Structural parameters: The number of base decision trees is set to 150, and the maximum depth of a single tree is limited to 3 layers. This configuration effectively controls the risk of overfitting while ensuring the expressive power of the model. At the same time, each leaf node is set to contain at least 3 equivalent weights of samples.
[0027] Learning strategy: A learning rate of 0.2 was used to achieve stable convergence, and the minimum gain threshold for splitting was set to 0.3 to balance the model's accuracy and generalization ability. The logarithmic loss function was chosen as the core metric for model optimization, which aligns well with the asymmetric nature of false positive and false negative costs in clinical diagnosis.
[0028] The calculation results using the constructed XGBoost algorithm are shown in Table 2 below: Table 2 Statistical results based on XGBoost
[0029] The results showed that the model exhibited high sensitivity (0.87) and specificity (0.96) for Crohn's disease detection, with an AUC of 0.98, indicating excellent discriminative ability. The normal control group showed better precision (0.97) and sensitivity (0.96), but slightly lower specificity (0.87). Overall, the model demonstrated good discrimination between the two groups, with an AUC close to 1 for Crohn's disease, suggesting higher diagnostic value in this disease identification.
[0030] Reference Figure 5 , Figure 6 as well as Figure 7 To ensure the model's suitability for this study, in addition to the XGBoost model, this paper compares it with four other commonly used classification models, including Random Forest, Multilayer Perceptron (MLP), Logistic Regression, and Support Vector Machine (SVM). The datasets and data processing methods used are consistent, and the models are trained and validated separately, with the corresponding AUC curves calculated.
[0031] As a preferred embodiment of the present invention, the process of adaptively completing user-related prediction data specifically includes: The system performs field matching on user-related prediction data according to a preset template. When there are missing fields or missing items, the data is supplemented by the median of the historical data corresponding to the missing fields to form the data to be predicted.
[0032] In this preferred embodiment, considering the impact of missing fields on the analysis results, the median of historical data is used to fill in the missing items, which can reduce the impact of missing items to a certain extent.
[0033] As a preferred embodiment of the present invention, the process of adaptively completing user-related prediction data specifically includes: The system performs field matching on user-related prediction data according to a preset template. When a missing field (i.e., a missing item) is found... The missing items in the preset template are identified, and the Euclidean distance of the missing items with preset weights is calculated in the pre-established sample library. The complete sample set with Euclidean distance less than the first threshold is found. If the complete sample set is empty, the sample with the smallest Euclidean distance is found and the missing items are filled with the corresponding data in the sample. If the complete sample set is not empty, the missing items are filled with the average value of the corresponding data in the complete sample set to form the data to be predicted.
[0034] In this preferred embodiment, considering the potential inaccuracies of using the median of historical data for missing item imputation, a method is used to assess user similarity by calculating the Euclidean distance between the user and samples in a pre-established sample library using preset weights for non-missing items. This method identifies more similar samples (i.e., samples with an Euclidean distance less than a first threshold) and constructs an imputation sample set. Analysis of the results shows that this significantly improves the accuracy of Crohn's disease risk prediction for users with missing items, especially those with missing important indicators. Furthermore, if an imputation sample set cannot be found, after completing the Crohn's disease risk assessment for a user, the relevant data of the user with imputation completed is added as a new sample to the sample library to update the sample library.
[0035] In a preferred embodiment of the present invention, specifically, the acquisition of training samples for the pre-established Crohn's disease auxiliary prediction model includes, The ADASYN algorithm is used to oversample the Crohn's disease minority class samples in the training data. The steps are as follows: Step 1: Set the number of samples to be synthesized according to requirements. ; Step 2: For each minority class sample Find its vicinity based on Euclidean distance. Find the K nearest neighbor samples and calculate the proportion of the majority class samples among the K nearest neighbor samples: , (1); in, This refers to the number of minority class samples, i.e., the number of Crohn's cases; It is a sample The number of samples belonging to the majority class among the K nearest neighbors. The value range of is [0, 1]; Step 3: [The sentence is incomplete and requires more context.] The standardization is as follows: (2); Step 4: Calculate each sample Number of synthetic samples to be generated : (3); Step 5: From After calculating the number of minority class samples needed, use the following formula to generate new synthetic minority class samples. , (4); in, This represents a newly generated minority class sample; Represents the original minority class sample; A random number between 0 and 1; This represents a randomly selected nearest neighbor sample.
[0036] In this preferred embodiment, categorical variables (such as 'gender' and 'grouping') are numerically encoded (male = 0, female = 1; normal control group = 0, Crohn's disease group = 1). For missing values in numerical features, a median imputation method is used: first, the median of the features for the Crohn's disease group and the normal control group is calculated, and then missing values are imputed according to the group to which the cases belong. This method preserves the data distribution characteristics between different groups and avoids the bias that may be introduced by global imputation. Subsequently, to address the imbalance of sample data, the aforementioned ADASYN algorithm is used to oversample the Crohn's disease minority class samples, focusing on the density distribution of the boundary regions of the minority class samples during the sampling process.
[0037] In a preferred embodiment of the present invention, the calculation process of the predicted value of the pre-established Crohn's disease auxiliary prediction model specifically includes: sample final predicted value The scores of all decision tree nodes are summed: (5); Where K is the number of iterations of the decision tree; For the first The score obtained by each decision leaf node; For data sample numbers; This is the decision tree sequence number.
[0038] In a preferred embodiment of the present invention, specifically, the pre-established Crohn's disease auxiliary prediction model obtains the score of each tree in the model by setting an objective function for each decision tree, and expands the loss function in the objective function and iterates the complexity function using the Taylor second-order formula. The simplified objective function is as follows: (6); in, The set of all training samples indexed by the leaf node j; and For the loss function of the tree The first and second derivatives; T is the number of leaf nodes in the current tree; γ is the penalty term for the number of nodes; For the first The score obtained from each node; λ is the L2 regularization penalty term used to control the generalization error of the model and prevent overfitting.
[0039] In a preferred embodiment of the present invention, specifically, the pre-established Crohn's disease auxiliary prediction model uses a criterion based on the objective function gain to determine whether to split a node during the construction of a single tree. For example, assuming the current node N is split into a left child node L and a right child node R: (7); in, It is the first gradient of all samples falling into the left child node L. sum; It is the second gradient of all samples falling into the left child node L. sum; It is the first gradient of all samples falling into the right child node R. sum; It is the second gradient of all samples falling into the right child node R. sum; These represent the sets of samples that fall into the left and right child nodes after the split, respectively. It is the same leaf node complexity penalty coefficient as in the objective function; It is the same L2 regularization coefficient as in the objective function; calculate the Gain corresponding to all possible split points, i.e., feature + threshold, and select the split point that maximizes the Gain for splitting. If the maximum Gain is less than 0, or compared with 0, or if... If the node does not split, it will become a leaf node.
[0040] As a preferred embodiment of the present invention, specifically, the pre-established Crohn's disease auxiliary prediction model optimizes the binary classification task by introducing a class weight scaling factor at the loss function level. When the ratio of positive to negative samples in the training data is severely imbalanced, the model's process of optimizing the objective function through gradient descent will naturally tend towards the majority class problem. The formula for calculating the class weight scaling factor is: (8); in, It is the number of Crohn's case samples in the training set, i.e., the number of samples with a label of 0; It is the number of normal samples in the training set, i.e., the number of samples with a label of 1.
[0041] Globally amplify the loss term for positive samples. By amplifying the contribution of minority class samples in the objective function optimization process, the model promotes a balance between the total contribution of positive samples and negative samples to the objective function, making the model pay more attention to the minority class and thus improving its recognition ability.
[0042] Example 2: The present invention also proposes a machine learning-based Crohn's disease auxiliary prediction device, comprising the following: The data acquisition module is used to acquire relevant prediction data from users; The data completion module is used to determine whether there are missing items in the user's relevant prediction data. If there are, an alarm will be issued to remind the user to fill them in. If the user confirms that they cannot fill them in, adaptive completion will be performed to finally form the data to be predicted. The result prediction module is used to input the data to be predicted into a pre-established Crohn's disease auxiliary prediction model, and the Crohn's disease auxiliary prediction model outputs the prediction result. The Crohn's disease auxiliary prediction model is built based on the XGBoost model; The visualization module is used to visualize and display the prediction results to inform the user.
[0043] Although the description of the invention has been quite detailed and particularly of several described embodiments, it is not intended to limit it to any of these details or embodiments or any particular embodiment, but should be considered as providing a broad possible interpretation of the claims by referring to the appended claims and taking into account the prior art, thereby effectively covering the intended scope of the invention. Furthermore, the invention has been described above with respect to embodiments foreseeable by the inventors in order to provide a useful description, and non-substantial modifications to the invention that have not yet been foreseen may still represent equivalent modifications.
[0044] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any embodiment that achieves the technical effects of the present invention using the same means should fall within the protection scope of the present invention. Within the protection scope of the present invention, various modifications and variations can be made to the technical solutions and / or implementation methods.
Claims
1. A machine learning-based method for assisting in the prediction of Crohn's disease, characterized in that, Including the following: Obtain user-related prediction data; Determine if there are missing items in the user's relevant prediction data. If so, alert the user to supplement them. If the user confirms that they cannot supplement them, perform adaptive completion to finally form the data to be predicted. The data to be predicted is input into a pre-established Crohn's disease auxiliary prediction model, and the Crohn's disease auxiliary prediction model outputs the prediction result. The Crohn's disease auxiliary prediction model is built based on the XGBoost model; The prediction results are then visualized and presented to the user.
2. The machine learning-based Crohn's disease assisted prediction method according to claim 1, characterized in that, Specifically, the process of adaptively completing user-related prediction data includes: The system performs field matching on user-related prediction data according to a preset template. When there are missing fields or missing items, the data is supplemented by the median of the historical data corresponding to the missing fields to form the data to be predicted.
3. The machine learning-based Crohn's disease assisted prediction method according to claim 1, characterized in that, Specifically, the process of adaptively completing user-related prediction data includes: The system performs field matching on user-related prediction data according to a preset template. When a missing field (i.e., a missing item) is found... The missing items in the preset template are identified, and the Euclidean distance of the missing items with preset weights is calculated in the pre-established sample library. The complete sample set with Euclidean distance less than the first threshold is found. If the complete sample set is empty, the sample with the smallest Euclidean distance is found and the missing items are filled with the corresponding data in the sample. If the complete sample set is not empty, the missing items are filled with the average value of the corresponding data in the complete sample set to form the data to be predicted.
4. The machine learning-based Crohn's disease assisted prediction method according to claim 1, characterized in that, Specifically, obtaining training samples for the pre-established Crohn's disease auxiliary prediction model includes: The ADASYN algorithm is used to oversample the Crohn's disease minority class samples in the training data. The steps are as follows: Step 1: Set the number of samples to be synthesized according to requirements. ; Step 2: For each minority class sample Find its vicinity based on Euclidean distance. Find the K nearest neighbor samples and calculate the proportion of the majority class samples among the K nearest neighbor samples: , (1); in, This refers to the number of minority class samples, i.e., the number of Crohn's cases; It is a sample The number of samples belonging to the majority class among the K nearest neighbors. The value range of is [0, 1]; Step 3: [The sentence is incomplete and requires more context.] The standardization is as follows: (2); Step 4: Calculate each sample Number of synthetic samples to be generated : (3); Step 5: From After calculating the number of minority class samples needed, use the following formula to generate new synthetic minority class samples. , (4); in, This represents a newly generated minority class sample; Represents the original minority class sample; A random number between 0 and 1; This represents a randomly selected nearest neighbor sample.
5. The machine learning-based Crohn's disease assisted prediction method according to claim 1, characterized in that, Specifically, the calculation process for the predicted values of the pre-established Crohn's disease auxiliary prediction model includes: sample final predicted value The scores of all decision tree nodes are summed: (5); Where K is the number of iterations of the decision tree; For the first The score obtained by each decision leaf node; For data sample numbers; This is the decision tree sequence number.
6. The machine learning-based Crohn's disease assisted prediction method according to claim 5, characterized in that, Specifically, the pre-established Crohn's disease-assisted prediction model obtains the score of each tree in the model by setting an objective function for each decision tree. The loss function in the objective function is expanded using the Taylor second-order formula, and the complexity function is iterated. The simplified objective function is shown in the following equation: (6); in, The set of all training samples indexed by the leaf node j; and For the loss function of the tree The first and second derivatives; T is the number of leaf nodes in the current tree; γ is the penalty term for the number of nodes; For the first The score obtained from each node; λ is the L2 regularization penalty term used to control the generalization error of the model and prevent overfitting.
7. The machine learning-based Crohn's disease assisted prediction method according to claim 6, characterized in that, Specifically, the pre-established Crohn's disease-assisted prediction model uses a criterion based on the objective function gain to decide whether to split a node during the construction of a single tree. For example, it might split the current node N into a left child node L and a right child node R: (7); in, It is the first gradient of all samples falling into the left child node L. sum; It is the second gradient of all samples falling into the left child node L. sum; It is the first gradient of all samples falling into the right child node R. sum; It is the second gradient of all samples falling into the right child node R. sum; These represent the sets of samples that fall into the left and right child nodes after the split, respectively. It is the same leaf node complexity penalty coefficient as in the objective function; It is the same L2 regularization coefficient as in the objective function; calculate the Gain corresponding to all possible split points, i.e., the feature + threshold, and select the split point that maximizes the Gain for splitting. If the maximum Gain is less than 0, or compared with 0, or if... If the node does not split, it will become a leaf node.
8. The machine learning-based Crohn's disease assisted prediction method according to claim 1, characterized in that, Specifically, the pre-established Crohn's disease-assisted prediction model optimizes binary classification tasks by introducing a class weight scaling factor at the loss function level. When the ratio of positive to negative samples in the training data is severely imbalanced, the model's optimization of the objective function through gradient descent will naturally favor the majority class problem. The formula for calculating the class weight scaling factor is: (8); in, It is the number of Crohn's case samples in the training set, i.e., the number of samples with a label of 0; It is the number of normal samples in the training set, i.e., the number of samples with a label of 1; Globally amplify the loss term for positive samples. By amplifying the contribution of minority class samples in the objective function optimization process, the model promotes a balance between the total contribution of positive samples and negative samples to the objective function, making the model pay more attention to the minority class and thus improving its recognition ability.
9. A machine learning-based Crohn's disease assisted prediction device, characterized in that, Including the following: The data acquisition module is used to acquire relevant prediction data from users; The data completion module is used to determine whether there are missing items in the user's relevant prediction data. If there are, an alarm will be issued to remind the user to fill them in. If the user confirms that they cannot fill them in, adaptive completion will be performed to finally form the data to be predicted. The result prediction module is used to input the data to be predicted into a pre-established Crohn's disease auxiliary prediction model, and the Crohn's disease auxiliary prediction model outputs the prediction result. The Crohn's disease auxiliary prediction model is built based on the XGBoost model; The visualization module is used to visualize and display the prediction results to inform the user.