Tizanidine administration dosage prediction method and prediction model generation method thereof
By acquiring and processing patient case data, the tizanibide dosage prediction model is generated using an integrated learning model, which solves the problem of insufficient universality of the tizanibide dosage prediction model in the prior art and achieves more accurate and personalized dosage prediction.
Patent Information
- Application Number
- CN202411061494.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-29
AI Technical Summary
The existing prediction models for tizanide dosage are less universal and it is difficult to accurately give the optimal dosage for different patients, especially for patients with special disease states or with multiple drugs.
By obtaining the case text data of the target patient, including personal characteristic data, disease characteristic data and medication use data, feature extraction and matrix construction are performed, and training is performed using an integrated learning model to generate tiza with stronger prediction accuracy and universality. Nidine dosage prediction model.
Improve the accuracy and universality of the prediction of tizanib-determined dosage, and can provide personalized dosage recommendations for different patients in different conditions. It is suitable for patients in different conditions, solving the universality of existing models. Insufficient problem.
Smart Images

Figure CN119049644A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the medical field, and in particular to a method for predicting a tizanidine dosage and a method for generating a prediction model thereof. Background Art
[0002] In the medical field, accurate dosage control is usually required for drug treatment of specific diseases. Tizanidine is a medicine that is usually used to treat a variety of diseases, including muscle spasms, epilepsy and mental disorders. However, due to the physical differences, severity of illness and other related factors of different patients, there are often large individual differences in the effective dose of tizanidine. Traditional dosage administration method is usually based on the experience of the physician to carry out initial setting, and then adjusted according to the patient's reaction, this method is not only inefficient, and may cause poor therapeutic effect or produce unnecessary side effects because of improper dosage adjustment. Along with technological development, the method for dosage prediction by mathematical model has also appeared, and the key of these methods is to generate the tizanidine dosage prediction model with predictive power.
[0003] The generation method of existing tizanidine dosage prediction model, mainly sets up traditional data model by some historical medical data, describes absorption, distribution, metabolism and excretion process of drug in vivo, thus predicts the appropriate dose of different patients.Then in the modeling process, owing to not fully taking into account the own limitations of all relevant factors and traditional mathematical model, the universality of tizanidine dosage prediction model is lower, single model may not be applicable to all populations, particularly for the patient with special disease state or using multiple drugs, and then the tizanidine dosage prediction model generated, is difficult to more accurately provide the optimal dosage of tizanidine for different patients.
[0004] At present, no effective solution has been proposed for the problem that the prediction model generated by the existing method for generating the prediction model of tizanidine dosage has low universality. Summary of the invention
[0005] The present invention provides a tizanidine dosage prediction method and a method for generating a prediction model thereof, so as to solve the problem that the prediction model generated by the existing method for generating a tizanidine dosage prediction model has low universality.
[0006] A first aspect, provides a kind of generation method of tizanidine dosage prediction model in the present invention, comprising:
[0007] Acquire case text data of several target patients, wherein the target patients are patients who have taken tizanidine, and the case text data include personal characteristic data, disease characteristic data and medication status data;
[0008] Performing feature extraction on the case text data after data preprocessing to obtain several pairs of corresponding sample feature groups and sample labels, wherein the sample feature groups are extracted from the personal feature data and the disease feature data, and the sample labels are extracted from the medication data;
[0009] Constructing a feature matrix and a label vector respectively according to the several pairs of corresponding sample feature groups and sample labels;
[0010] The target integrated learning model is trained by the feature matrix and the label vector to obtain a tizanidine dosage prediction model.
[0011] Second aspect, a kind of tizanidine dosage prediction method is provided in the present invention, comprising:
[0012] Based on the personal characteristic data and the disease characteristic data of patient to be treated, predict the tizanidine dosage of described patient to be treated by target tizanidine dosage prediction model;
[0013] Wherein, the target tizanidine dosage prediction model is obtained by the generation method of the tizanidine dosage prediction model described in the first aspect.
[0014] The third aspect provides a generation device of a tizanidine dosage prediction model in the present invention, comprising:
[0015] A data acquisition module is used to acquire case text data of several target patients, wherein the target patients are patients who have taken tizanidine, and the case text data includes personal characteristic data, disease characteristic data and medication status data;
[0016] A feature extraction module is used to extract features from the case text data after data preprocessing to obtain a number of corresponding sample feature groups and sample labels, wherein the sample feature groups are extracted from the personal feature data and the disease feature data, and the sample labels are extracted from the medication data;
[0017] A feature processing module, used to construct a feature matrix and a label vector according to the corresponding sample feature groups and sample labels;
[0018] The model training module is used for training the target integrated learning model through the feature matrix and the label vector to obtain a tizanidine dosage prediction model.
[0019] A fourth aspect provides an electronic device in the present invention, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the generation method of the tizanidine dosage prediction model described in the first aspect.
[0020] Compared with related art, the generation method of tizanidine dosage prediction model provided by the present invention mainly utilizes rich and comprehensive personal characteristic data, disease characteristic data and medication situation data to train integrated learning model.On the one hand, because the data adopted for training are relatively comprehensive, personal characteristic data and disease characteristic data are considered simultaneously, so that the integrated learning model after training has stronger prediction accuracy and universality, can provide more accurately dosage prediction for different patients of different conditions of illness in a targeted manner.On the other hand, the integrated learning model also has better universality compared to traditional data model, and the integrated learning model after training can be applicable to different patients of different conditions of illness.Therefore, the problem of low universality of the prediction model generated by the generation method of existing tizanidine dosage prediction model is solved.
[0021] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the generation method of the tizanidine dosage prediction model provided in some embodiments of the present invention;
[0023] Figure 2 It is a flow chart of the tizanidine dosage prediction method provided in some embodiments of the present invention. DETAILED DESCRIPTION
[0024] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0025] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0026] A method for generating a tizanidine dosage prediction model is provided in the present invention. Figure 1 It is the flow chart of the generation method of the tizanidine dosage prediction model provided in some embodiments of the present invention, such as Figure 1 As shown, the process includes step S110, step S120, step S140 and step S150.
[0027] Step S110, obtaining case text data of a number of target patients, the target patients are patients who have taken tizanidine, and the case text data includes personal characteristic data, disease characteristic data and medication status data.
[0028] Among them, the methods of obtaining case text data include electronic medical record systems, medical test reports and patient self-reports.
[0029] In some of the embodiments, personal characteristic data include age, gender, weight, genotype, past medical history, medication status, physiological indicators and living habits; disease characteristic data include disease type and disease severity; medication status data include medication dosage and medication feedback, medication feedback mainly includes medication effect, disease condition changes, drug reactions and side effects, etc. Past medical history mainly includes disease course, pathological changes, previous treatment response, etc.
[0030] For example, the case text data is as follows:
[0031] Patient information: Female; 45 years old.
[0032] Chief complaint: Recurrent headaches for 5 years, aggravated and accompanied by insomnia for 1 week.
[0033] Current medical history: The patient began to experience headaches without obvious causes 5 years ago, mainly manifested as tight pain in the bilateral temporal and occipital regions, accompanied by a sense of pressure on the top of the head and stiffness in the neck. The headache worsens when tired or emotionally stressed, and can be partially relieved after rest and massage. In the past week, the patient's headache has significantly worsened, with daily attacks and prolonged duration, accompanied by severe insomnia, and can only sleep 3-4 hours a night, accompanied by irritability and anxiety. The patient was admitted to our hospital for further treatment.
[0034] Past medical history: He has hypertension and denies any history of diabetes. He denies any history of food or drug allergies. He denies any history of infectious diseases, trauma, or other major diseases.
[0035] Physical examination: body temperature 36.8℃, pulse 76 times / min, respiration 18 times / min, blood pressure 120 / 80mmHg. Clear consciousness, slightly anxious expression. No obvious abnormality was found in the neurological examination.
[0036] Auxiliary examination:
[0037] 1. Routine biochemical tests such as blood routine, liver and kidney function, electrolytes, blood sugar, and blood lipids were all normal.
[0038] 2. No obvious abnormalities were found in the cranial MRI examination.
[0039] 3. The Hamilton Anxiety Rating Scale score showed moderate anxiety symptoms.
[0040] 4.VAS pain score was 8 points, severe.
[0041] Initial diagnosis:
[0042] 1. Tension-type headache.
[0043] 2. Anxious state.
[0044] 3. Sleep disorders.
[0045] Treatment options:
[0046] 1. Drug treatment:
[0047] Acute treatment: Give ibuprofen sustained-release capsules 0.3g, twice a day, orally to relieve pain.
[0048] Preventive treatment: None.
[0049] Tizanidine tablets: Initial dose 2 mg, three times a day, orally after meals. Gradually adjust the dose according to the relief of headache, the maximum dose does not exceed 12 mg per day, taken three times. Tizanidine, as a central skeletal muscle relaxant, can effectively relieve cranial muscle tension and relieve headaches.
[0050] Paroxetine 20 mg, once a day, orally, for anxiety and depression.
[0051] Estazolam 1 mg, taken orally once a night, improves sleep.
[0052] 2. Non-drug treatment:
[0053] Acupuncture therapy: once a day, promotes muscle relaxation and relieves headaches.
[0054] Cognitive behavioral psychotherapy: once a week, helps patients adjust their mindset and reduce anxiety.
[0055] Treatment process:
[0056] After the patient was admitted to hospital, the above scheme was used for treatment. Mild dry mouth and fatigue occurred in the early stage of the medicine, without special treatment, and the symptoms were relieved spontaneously after one week. In the first three days, the patient's headache symptoms were relieved, but sleep at night was still poor. From the fourth day, according to the headache relief situation, the tizanidine dosage was adjusted to 4mg, three times a day. After one week, the patient's headache symptoms were significantly alleviated, VAS pain score 3 points, mild. The frequency of attacks decreased, sleep at night improved, and anxiety was also alleviated. The patient took the medicine as prescribed by the doctor, and the follow-up visit was on time, and compliance was good.
[0057] Discharge status:
[0058] The patient's headache symptoms were basically controlled, he slept well at night, and his anxiety was stable. He continued to take the adjusted dose of tizanidine when he was discharged from the hospital, and it was recommended to follow up at regular outpatient clinics, continue to receive non-drug treatment, and adjust his lifestyle, keep a happy mood, avoid excessive fatigue and emotional tension. The patient usually has high work pressure, lacks exercise, has an irregular diet, and falls asleep late. It is recommended to adjust work and rest after discharge, exercise moderately, and maintain a balanced diet.
[0059] The above is an example of case text data, from which the personal characteristic data, disease characteristic data and medication status data of the corresponding patient can be extracted.
[0060] Step S120, feature extraction is performed on the several case text data after data preprocessing to obtain several pairs of corresponding sample feature groups and sample labels, the sample feature groups are extracted from the personal feature data and the disease feature data, and the sample labels are extracted from the medication data.
[0061] In some of the embodiments, the preprocessing step of the case text data includes step S121 and step S122.
[0062] Step S121, cleaning the case text data to remove irrelevant characters and noise.
[0063] Data cleaning specifically includes removing punctuation marks, numbers, irrelevant words, etc., and only retaining meaningful Chinese characters. For example, regular expressions can be used to remove non-Chinese characters in the text, or Chinese word segmentation tools can be used to remove stop words and punctuation marks.
[0064] Step S122, entity annotation is performed on the personal characteristic data, disease characteristic data and medication status in the case text data.
[0065] Wherein, entity annotation specifically includes marking the entity (such as disease, symptom, medicine etc.) in the case text. Existing medical natural language processing tools can be used to automatically mark the entity in the text. For example, BIOSSES tool is used to mark entities such as disease, symptom, medicine in the text. For case text, diseases and symptoms such as "headache", "insomnia" can be marked as "disease" and "symptom" categories, and drug names such as "ibuprofen sustained-release capsules", "tizanidine tablets" are marked as "drug" categories. In the subsequent processing process, the entity itself is used as a feature value, and the type of entity is used as a feature.
[0066] In some of the embodiments, the feature extraction step of the case text data includes step S123, step S124, step S125 and step S126.
[0067] Step S123, convert each entity marked in the case text data into a vector form to obtain word embedding.
[0068] Specifically, word embedding includes: converting words in the text into vector form to represent the meaning and contextual relationship of the words. A pre-trained Chinese word embedding model (such as FastText or Word2Vec) can be used to obtain the vector representation of each word. For example, a pre-trained Chinese word embedding model can be used to map each word to a vector of a fixed length. For case text, words such as "headache" and "insomnia" can be mapped to a fixed-length vector to represent the meaning and contextual relationship of these words.
[0069] In step S124, a convolution operation is performed on each word embedding through an IDCNN layer to obtain a feature map. The IDCNN layer includes a plurality of convolution kernels of different sizes for capturing context information of different lengths.
[0070] Among them, the convolution operation specifically includes: performing a series of convolution operations on word embeddings, and capturing contextual information of different lengths through convolution kernels of different sizes. For example, multiple convolution kernels (such as 3, 4, 5) can be used to convolve the text to obtain a series of feature maps. These feature maps can express the correlation between words at different positions in the text. For case text, the IDCNN layer can be used to extract features in the text, such as extracting features of diseases and symptoms such as "headache" and "insomnia", as well as extracting features of drug names such as "ibuprofen sustained-release capsules" and "tizanidine tablets".
[0071] Step S125, based on the feature map, each entity is classified and labeled through the CRF layer to obtain the category and boundary position of each entity.
[0072] This step is sequence labeling, which specifically includes: passing the feature map output by the IDCNN layer to the CRF layer. The CRF layer will classify and label each entity, giving the category (such as "drug", "dose", "adverse reaction", etc.) and boundary position of each entity. The conditional random field (CRF) model is used to identify entities in the text and classify them into different categories. For case text, the CRF layer can be used to label entities such as diseases, symptoms, and drugs in the text. For example, diseases and symptoms such as "headache" and "insomnia" are labeled as "disease" and "symptom" categories, and drug names such as "ibuprofen sustained-release capsules" and "tizanidine tablets" are labeled as "drug" categories.
[0073] Step S126, determining each pair of corresponding sample feature groups and sample labels in the output of the CRF layer, wherein the entities and their categories constitute feature values and features respectively, and the sample feature groups and sample labels respectively include different multiple feature values.
[0074] For each patient, multiple feature values can be extracted from their personal feature data and disease feature data to form a set of sample feature groups, and multiple feature values can be extracted from their medication data to form a set of sample labels. The sample feature groups and sample labels corresponding to the same patient correspond to each other. Therefore, based on the case text data of several target patients, several pairs of corresponding sample feature groups and sample labels can be obtained.
[0075] Specifically, extract the features related to the optimal dosage of tizanidine from the output of the CRF layer. For example, according to the output of the CRF layer, the features such as symptoms, medicines, dosages and the like related to tizanidine can be extracted. For case text, the features such as symptoms, medicines, dosages and the like related to tizanidine can be extracted. For example, using diseases and symptoms such as "headache" and "insomnia" as relevant feature values, using drug names such as "ibuprofen sustained-release capsules" and "tizanidine tablets" as relevant feature values, the above-mentioned relevant feature values can constitute a sample feature group; and using information such as the dosage and usage of the drug as relevant features, for generating sample labels. Wherein, according to the actual dosage of the case text, generate corresponding labels. For case text, the information such as the dosage and usage of the drug can be used as labels, such as using feature values such as "three times a day, 4 milligrams each time" as labels. By label generation, the model can be made to better understand the optimal dosage of tizanidine, laying the foundation for subsequent model training tasks.
[0076] Step S140: construct a feature matrix and a label vector according to several pairs of corresponding sample feature groups and sample labels.
[0077] In some embodiments, the sample feature group and the sample label need to be preprocessed before step S140. The sample feature group and the sample label preprocessing step includes step S131, step S132, step S133 and step S134.
[0078] Step S131 : For non-numeric feature values in the sample feature group and the sample label, perform numerical encoding on the non-numeric feature values.
[0079] Specifically, the category features extracted from the CRF layer, such as diseases, symptoms, and drugs, are discrete and non-numeric. In order to input these features into the machine learning model, they need to be converted to numerical types. One-hot encoding is a commonly used method that assigns a unique binary vector to each category. For example, in the case text, the category features include "disease" (such as tension-type headache, anxiety state, sleep disorder), "symptom" (such as headache, insomnia, anxiety), "drug" (such as ibuprofen sustained-release capsules, tizanidine tablets, paroxetine, estazolam), etc. For the "disease" feature, "tension-type headache" can be encoded as [1,0,0], "anxiety state" is encoded as [0,1,0], and "sleep disorder" is encoded as [0,0,1].
[0080] Step S132: normalize the numerical feature values in the sample feature group and the sample label.
[0081] Specifically, for numerical features such as dosage, since their dimensions and value ranges may be different, directly inputting them into the model may affect the performance of the model. Therefore, normalization is required to scale them to a uniform range to avoid problems caused by different dimensions. For example, the numerical features in the case text include the dosage of the drug (such as the initial dose of tizanidine 2 mg, the adjusted dose 4 mg), age (45 years old), body temperature (36.8 ° C), pulse (76 times / min), etc. The dosage feature can be normalized to the [0,1] interval.
[0082] Step S133: sort the importance of each feature using a random forest model, and retain at least one feature value with the highest importance in the sample feature group based on the importance sorting result.
[0083] Specifically, feature selection is an important step, which can remove irrelevant or redundant features and improve the performance and interpretability of the model. In order to quantify the importance of features, the present invention uses a random forest model. During the training process, the model constructs multiple decision trees and selects the most important features for splitting at the splitting nodes of each decision tree. By counting the number of times each feature is selected as a splitting node or the average depth and other information in all decision trees, the importance score of each feature can be obtained. After obtaining the importance score of each feature, the most useful features for predicting the dosage task can be selected according to the score in combination with the specific content of the case text. This usually involves setting a threshold or selecting the top N features with the highest scores as the input of the model. For example, if a symptom appears frequently in the case text and has a significant correlation with the change in dosage (i.e., the importance score of the symptom is high), then this symptom feature may be selected as an important input feature of the model. On the contrary, if a drug name rarely appears in the case text, or has no obvious correlation with the dosage (i.e., the importance score of the drug name is low), then this drug name feature may be removed during the feature selection process.
[0084] It should be noted that the features corresponding to the feature values contained in the sample feature groups and sample labels corresponding to different patients should be the same. After some important features are screened out, the feature values of these features can be retained only in the sample feature groups.
[0085] Step S134, calculating the correlation between the features, and for a pair of features whose correlation is higher than a threshold, retaining the feature value of one of the features in the sample feature group.
[0086] Specifically, check the correlation between features and remove highly correlated features to reduce feature redundancy. For example, if "headache severity" and "VAS pain score" are highly correlated, one of them can be selected as a representative.
[0087] Step S135, filling in the missing feature values in the sample feature group.
[0088] Since the patient's case text data may be missing, it may not be possible to extract the eigenvalues of all selected features from its case text data, which means that the eigenvalues of some features are missing. For the missing eigenvalues, the present invention adopts a filling method to process. Common filling methods include mean filling, median filling, mode filling, etc. These methods can fill the missing values according to the distribution of the features to make the data set more complete. For example, if a certain eigenvalue of a patient is missing, the mean value of the feature among all patients can be used to fill it.
[0089] Step S136, combining different features to form new features based on domain prior knowledge, and adding feature values of the new features to the sample feature group.
[0090] Specifically, based on domain knowledge, some features can be combined to create new features. These new features may contain more information and help improve the prediction performance of the model. For example, the present invention uses the combination of a symptom and a drug as a new feature to represent the effect of this combination on the dosage.
[0091] In step S140, the step of constructing the feature matrix includes step S141 and step S142. The step of constructing the label vector includes step S143, step S144 and step S145.
[0092] Step S141, feature sorting and organization.
[0093] Before constructing the feature matrix, you need to make sure that all features are arranged in a uniform order. This helps the model to correctly parse the features during training and prediction. Each row of the feature matrix represents a sample (such as a patient case), and each column represents a specific feature (such as disease type, symptom, drug name, drug dosage, etc.).
[0094] Step S142, integrity check of the feature matrix.
[0095] After constructing the feature matrix, a sanity check is performed to ensure that there are no missing or incorrect eigenvalues. It is also necessary to check whether the dimension of the feature matrix matches the expected number of samples and features.
[0096] Step S143, label conversion.
[0097] If the label for the dosage is in string form (e.g., "4 mg three times daily"), it needs to be converted to numeric form so that the model can train and predict. This conversion method may include parsing the string into a numeric value (e.g., parsing "4 mg three times daily" into a daily dose of 12 mg), or using a unique encoding to map each unique label string to a unique integer.
[0098] Step S144, constructing a label vector.
[0099] The converted labels will form a label vector, where each element corresponds to a sample in the feature matrix, and the length of the label vector should match the number of rows in the feature matrix to ensure that each sample has a corresponding label.
[0100] Step S145, verification of label vector.
[0101] After constructing the label vector, you need to verify that the length of the label vector is consistent with the number of rows in the feature matrix. You also need to check whether the values in the label vector are within the expected range and there are no missing or incorrect label values.
[0102] Step S150, training the target ensemble learning model through the feature matrix and the label vector to obtain a tizanidine dosage prediction model.
[0103] The present invention includes numerical and categorical data, and the GradientBoosting classifier can be selected as the target ensemble learning model because it can automatically handle complex interactions and nonlinear relationships between features, which is particularly important for dosage prediction because the dosage may be complexly affected by multiple factors.
[0104] The optimization of the target ensemble learning model mainly includes the following parts:
[0105] (1) Model training.
[0106] Use the previously constructed feature matrix and label vector. Select the Gradient Boosting algorithm for model training. This algorithm is an ensemble learning algorithm based on decision trees that improves the prediction performance of the model by iteratively adding new decision trees. Set a suitable loss function (such as mean square error) and use cross-validation to evaluate the performance of the model. During the training process, you can use methods such as grid search to adjust hyperparameters to find the optimal model configuration. By adjusting the hyperparameters, you can find a balance point so that the model performs well on both the training set and the test set.
[0107] (2) Parameter adjustment.
[0108] Using methods such as cross validation and grid search, you can try different parameter combinations and evaluate the model performance under different parameter combinations. By repeatedly adjusting the parameters, you can find the optimal parameter combination and improve the prediction performance of the model.
[0109] 1) Cross validation.
[0110] In order to evaluate the generalization ability of the model, the cross-validation method is used. Specifically, the training set is further divided into k subsets (for example, k = 5), and k-1 subsets are selected for model training each time, and the remaining one is used as the validation set. This process is repeated k times, and a different subset is used as the validation set each time. In this way, all data can be fully utilized to evaluate the performance of the model and ensure that the model is not overfitting or underfitting.
[0111] 2) Grid search.
[0112] In order to find the optimal hyperparameter combination, a grid search method is used. Specifically, a range is set for each hyperparameter, such as learning rate, number and depth of trees, etc. The grid search will traverse all possible hyperparameter combinations and use the results of cross-validation to evaluate the model performance under each combination. In this way, the optimal hyperparameter combination can be quickly found to improve the prediction performance of the model.
[0113] (3) Model evaluation.
[0114] Use the test set to evaluate the performance of the model and calculate the precision, recall, accuracy, recall, F1 value and other evaluation indicators. In addition to these indicators, you can also calculate the AUC-ROC value to evaluate the classification effect of the model. Through these evaluation indicators, you can understand the performance of the model from multiple perspectives.
[0115] 1. Precision evaluation: Precision is the proportion of samples predicted as positive that are correctly identified as positive. The calculation formula is: Precision = TP / FP + TP, where TP represents true positives and FP represents false positives. Precision is used to measure the accuracy of the model. In order to calculate the precision, it is necessary to first determine the samples predicted as positive by the model, and then calculate the proportion of true positives among them. The relationship between the number of predicted positive examples and the precision can be controlled by adjusting the threshold or probability threshold.
[0116] 2. Recall evaluation: Recall is the proportion of samples that are actually positive that are correctly predicted as positive. The calculation formula is: Recall = TP / FN + TP, where TP represents true positive examples and FN represents false negative examples. Recall is used to measure whether the model can cover all positive samples. In order to calculate the recall rate, it is necessary to determine all samples that are actually positive and calculate the proportion of them that are correctly predicted as positive. The balance between recall and recall can be weighed by adjusting the threshold or probability threshold.
[0117] 3. F1 value evaluation: F1 value is the harmonic mean of precision and recall, which is used to comprehensively consider the accuracy and comprehensiveness of the model. The calculation formula is: F1 = 2 × Precision × Recall / Precision + Recall. The higher the F1 value, the better the model performance. In order to calculate the F1 value, it is necessary to consider both precision and recall and find an optimal balance.
[0118] 4. Accuracy: It is the ratio of the number of correctly predicted samples to the total number of samples; Accuracy = TP / (TP+FP).
[0119] 5. Recall rate: Recall rate (Recall) = TP / (TP+FN), which is the proportion of samples that are actually positive that are correctly predicted to be positive.
[0120] Among them, TP stands for True Positive, FP stands for False Positive, and FN stands for False Negative.
[0121] For example, the following is an example of model evaluation and precision and recall evaluation, where the number of samples is 300.
[0122] Assume that the tizanidine dosage prediction model is evaluated using the test set and the model's prediction results are obtained. Next, the model evaluation and precision and recall evaluation will be performed.
[0123] First, calculate the accuracy, recall, and F1 value of the model. Assume that there are 300 samples in the test set, of which 150 are positive examples (need to adjust the dosage) and 150 are negative examples (dosage adjustment is not required). The model predicts that the number of correct samples is 240, of which 135 are predicted as positive examples and 105 are predicted as negative examples. According to the calculation formulas for accuracy, recall, and F1 value, the following results can be obtained:
[0124] Accuracy = 240 / 300 = 0.8.
[0125] Recall = 135 / 150 = 0.9.
[0126] F1 value = 2*(precision*recall) / (precision+recall)=2*(0.8*0.9) / (0.8+0.9)=0.79.
[0127] Next, we evaluate the precision and recall. According to the number of samples predicted by the model as positive (135), the number of true positives is 125 and the number of false positives is 10. According to the calculation formula of precision and recall, we can get the following results:
[0128] Precision rate = 125 / 135 = 0.93.
[0129] Recall rate = 125 / 150 = 0.8.
[0130] Through these evaluation indicators, we can understand the performance of the model. In this example, the accuracy, recall and F1 value of the model are all high, indicating that the model performs well on the test set. At the same time, the precision and recall are also high, indicating that the model can accurately identify positive samples and cover most of the samples that are actually positive.
[0131] In practical applications, the performance of the model will be affected by many factors, including data quality, feature selection, and hyperparameter adjustment. Therefore, when evaluating the model, it is necessary to comprehensively consider multiple indicators and select appropriate evaluation indicators based on specific scenarios and needs. At the same time, hyperparameter adjustment methods such as cross-validation and grid search are also needed to optimize model performance.
[0132] (4) Model application and optimization.
[0133] Model application: Deploy the trained model to the actual clinical environment to provide patients with personalized tizanidine dosage recommendations. For example, for a 45-year-old male patient weighing 70 kg, if his baseline pain level is 5 (out of 10) and the dosing frequency is once a day, the model predicts that the optimal dosage is 30 mg / day. Doctors can develop a personalized treatment plan for the patient based on this recommendation.
[0134] Model optimization: As time goes by, new data accumulates. New data can be collected regularly to update and optimize the model to improve prediction accuracy and reliability. For example, the model can be retrained and parameters adjusted using the latest 200 patient data to improve the model's performance. Features can also be expanded or updated based on new data to improve the model's predictive power.
[0135] Real-time monitoring and feedback: During the model application process, the performance of the model needs to be monitored in real time and feedback needs to be provided. If the performance of the model is found to be degraded or abnormal, the parameters need to be adjusted or the model needs to be retrained in a timely manner. At the same time, the model can also be improved and optimized based on the feedback and suggestions of doctors.
[0136] In summary, the present invention provides a method for generating a tizanidine dosage prediction model.
[0137] Wherein, mainly utilize rich and comprehensive personal characteristic data, disease characteristic data and medication situation data to train ensemble learning model.On the one hand, because the data adopted for training are more comprehensive, personal characteristic data and disease characteristic data are considered simultaneously, the ensemble learning model after training is made to have stronger prediction accuracy and universality, can provide more accurately dosage prediction for different patients of different conditions of illness in a targeted manner.On the other hand, ensemble learning model also has better universality compared to traditional data model, and the ensemble learning model after training can be applicable to different patients of different conditions of illness.Therefore, solve the problem that the universality of the prediction model generated by the generation method of existing tizanidine dosage prediction model is lower.
[0138] A tizanidine dosage prediction method is also provided in the present invention, comprising:
[0139] Based on the personal characteristic data and disease characteristic data of the patient to be treated, the tizanidine dosage of the patient to be treated is predicted by a target tizanidine dosage prediction model.
[0140] Wherein, the target tizanidine dosage prediction model is obtained by the generation method of the tizanidine dosage prediction model provided by the present invention.
[0141] Specifically, refer to Figure 2 , in one embodiment, tizanidine dosage prediction method main model generation, dosage prediction and feedback optimization three parts.Wherein, model generation then adopts the generation method of tizanidine dosage prediction model provided by the present invention to generate target tizanidine dosage prediction model, mainly includes data collection and pre-processing, feature extraction, construction tizanidine optimal dosage prediction model (target tizanidine dosage prediction model) and integrated learning and prediction several steps.Dose prediction then is to input individual differences and disease characteristic data of patient to target tizanidine dosage prediction model, predicts the tizanidine dosage suitable for patient.Feedback optimization mainly includes dosage adjustment and feedback optimization.
[0142] In conjunction with the relevant explanation of the generation method of tizanidine dosage prediction model in the present invention, this tizanidine dosage prediction method has the following advantages:
[0143] Accurate prediction: The tizanidine dosage prediction method and system based on disease characteristics uses advanced machine learning algorithms and deep learning of a large number of historical cases to accurately predict the patient's tizanidine dosage and improve the effectiveness and safety of treatment.
[0144] Personalized treatment: The system analyzes the patient's disease characteristics and tailors a medication regimen for each patient to meet individual differences and improve treatment outcomes.
[0145] Intelligent decision support: The system has intelligent decision support function, which can provide doctors with multiple possible medication plans in a short time, helping doctors to make scientific and reasonable decisions quickly.
[0146] Improve efficiency: Automated predictions through computer algorithms greatly improve the efficiency and accuracy of dosage predictions and reduce the workload of doctors.
[0147] Safety assurance: The system can monitor the patient's condition in real time, adjust the dosage in time, effectively avoid medical accidents caused by improper medication, and ensure the patient's life safety.
[0148] A kind of generating device of tizanidine dosage prediction model is also provided in the present invention, and this device is used to realize above-described embodiment and preferred embodiment, and has been described and does not repeat them again.The software and / or hardware combination of the term "module", "unit", "subunit" etc. used below can realize predetermined function.Although the device described in the following examples is preferably realized with software, hardware, or the realization of the combination of software and hardware is also possible and conceived.
[0149] The generating device of tizanidine dosage prediction model provided by the present invention comprises:
[0150] The data acquisition module is used to acquire case text data of several target patients, the target patients are patients who have taken tizanidine, and the case text data includes personal characteristic data, disease characteristic data and medication status data.
[0151] The feature extraction module is used to extract features from several case text data after data preprocessing to obtain several pairs of corresponding sample feature groups and sample labels. The sample feature groups are extracted from personal feature data and disease feature data, and the sample labels are extracted from medication data.
[0152] The feature processing module is used to construct a feature matrix and a label vector according to several pairs of corresponding sample feature groups and sample labels.
[0153] The model training module is used to train the target ensemble learning model through the feature matrix and the label vector to obtain the tizanidine dosage prediction model.
[0154] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0155] The present invention also provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for generating a tizanidine dosage prediction model provided by the present invention.
[0156] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0157] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
Claims
1. a generation method of tizanidine dosage prediction model, is characterized in that, include: Acquire case text data of several target patients, wherein the target patients are patients who have taken tizanidine, and the case text data include personal characteristic data, disease characteristic data and medication status data; Performing feature extraction on the case text data after data preprocessing to obtain several pairs of corresponding sample feature groups and sample labels, wherein the sample feature groups are extracted from the personal feature data and the disease feature data, and the sample labels are extracted from the medication data; Constructing a feature matrix and a label vector respectively according to the several pairs of corresponding sample feature groups and sample labels; The target integrated learning model is trained by the feature matrix and the label vector to obtain a tizanidine dosage prediction model.
2. the generation method of tizanidine dosage prediction model according to claim 1, is characterized in that, The method of obtaining the case text data includes electronic medical record system, medical test report and patient self-report; And / or, the personal characteristic data includes age, gender, weight, genotype, past medical history, medication status, physiological indicators and living habits; and / or, the disease characteristic data includes disease type and disease severity; And / or, the medication data includes medication dosage and medication feedback.
3. the generation method of tizanidine dosage prediction model according to claim 2, is characterized in that, The preprocessing steps of the case text data include: Cleaning the case text data to remove irrelevant characters and noise; Entity annotation is performed on the personal characteristic data, disease characteristic data and medication status in the case text data.
4. the generation method of tizanidine dosage prediction model according to claim 3, is characterized in that, The feature extraction step of the case text data includes: Convert each entity marked in the case text data into a vector form to obtain a word embedding; Performing a convolution operation on each of the word embeddings through an IDCNN layer to obtain a feature map, wherein the IDCNN layer includes a plurality of convolution kernels of different sizes for capturing context information of different lengths; Based on the feature map, each of the entities is classified and labeled through a CRF layer to obtain a category and boundary position of each entity; Each pair of corresponding sample feature groups and sample labels is determined in the output of the CRF layer, wherein the entities and their categories constitute feature values and features, respectively, and the sample feature groups and sample labels include different multiple feature values, respectively.
5. according to the generation method of any one of claim 1-4 tizanidine dosage prediction model, it is characterized in that, Before constructing the feature matrix and the label vector, the method further includes performing feature preprocessing on the sample feature group and the sample label; The feature preprocessing step of the sample feature group and the sample label includes: For non-numeric feature values in the sample feature group and the sample label, numerically encode the non-numeric feature values; For the numerical feature values in the sample feature group and the sample label, normalizing the numerical feature values; The importance of each feature is sorted by a random forest model, and at least one feature value with the highest importance is retained in the sample feature group based on the importance sorting result; The correlation between the features is calculated, and for a pair of features whose correlation is higher than a threshold, the feature value of one of the features is retained in the sample feature group.
6. according to the generation method of any one of claim 5 tizanidine dosage prediction model, it is characterized in that, The feature preprocessing step of the sample feature group and the sample label also includes: Filling in missing feature values in the sample feature group; According to domain prior knowledge, different features are combined to form new features, and feature values of the new features are added to the sample feature group.
7. the generation method of the tizanidine dosage prediction model according to any one of claim 1, is characterized in that, The target ensemble learning model is a GradientBoosting classifier, and the training steps of the GradientBoosting classifier include: Cross-validation and grid search were used to optimize the hyperparameters of the Gradient Boosting classifier.
8. A tizanidine dosage prediction method, characterized in that, include: Based on the personal characteristic data and the disease characteristic data of patient to be treated, predict the tizanidine dosage of described patient to be treated by target tizanidine dosage prediction model; Wherein, the target tizanidine dosage prediction model is obtained by the generation method of the tizanidine dosage prediction model described in any one of claims 1-7.
9. a generating device for a tizanidine dosage prediction model, characterized in that, include: A data acquisition module is used to acquire case text data of several target patients, wherein the target patients are patients who have taken tizanidine, and the case text data includes personal characteristic data, disease characteristic data and medication status data; A feature extraction module is used to extract features from the case text data after data preprocessing to obtain a number of corresponding sample feature groups and sample labels, wherein the sample feature groups are extracted from the personal feature data and the disease feature data, and the sample labels are extracted from the medication data; A feature processing module, used to construct a feature matrix and a label vector according to the corresponding sample feature groups and sample labels; The model training module is used for training the target integrated learning model through the feature matrix and the label vector to obtain a tizanidine dosage prediction model.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for generating a tizanidine dosage prediction model according to any one of claims 1 to 7.
