Wang Mengying, Lee Cuixia, Wei Zhenhao, Ji Hong, Yang Yingyun, Yang Cheng
State Key Laboratory of Media Convergence and Communication, Communication University of China, No .1 Dingfuzhuang East Street, Chaoyang District, Beijing, China.
Peking University Third Hospital, Beijing, China.
BioData Min. 2023 Mar 16;16(1):11. doi: 10.1186/s13040-023-00328-y.
Tuberculosis is a dangerous infectious disease with the largest number of reported cases in China every year. Preventing missed diagnosis has an important impact on the prevention, treatment, and recovery of tuberculosis. The earliest pulmonary tuberculosis prediction models mainly used traditional image data combined with neural network models. However, a single data source tends to miss important information, such as primary symptoms and laboratory test results, that is available in multi-source data like medical records and tests. In this study, we propose a multi-stream integrated pulmonary tuberculosis diagnosis model based on structured and unstructured multi-source data from electronic health records. With the limited number of lung specialists and the high prevalence of tuberculosis, the application of this auxiliary diagnosis model can make substantial contributions to clinical settings.
The subjects were patients at the respiratory department and infectious cases department of a large comprehensive hospital in China between 2015 to 2020. A total of 95,294 medical records were selected through a quality control process. Each record contains structured and unstructured data. First, numerical expressions of features for structured data were created. Then, feature engineering was performed through decision tree model, random forest, and GBDT. Features were included in the feature exclusion set as per their weights in descending order. When the importance of the set was higher than 0.7, this process was concluded. Finally, the contained features were used for model training. In addition, the unstructured free-text data was segmented at the character level and input into the model after indexing. Tuberculosis prediction was conducted through a multi-stream integration tuberculosis diagnosis model (MSI-PTDM), and the evaluation indices of accuracy, AUC, sensitivity, and specificity were compared against the prediction results of XGBoost, Text-CNN, Random Forest, SVM, and so on.
Through a variety of characteristic engineering methods, 20 characteristic factors, such as main complaint hemoptysis, cough, and test erythrocyte sedimentation rate, were selected, and the influencing factors were analyzed using the Chinese diagnostic standard of pulmonary tuberculosis. The area under the curve values for MSI-PTDM, XGBoost, Text-CNN, RF, and SVM were 0.9858, 0.9571, 0.9486, 0.9428, and 0.9429, respectively. The sensitivity, specificity, and accuracy of MSI-PTDM were 93.18%, 96.96%, and 96.96%, respectively. The MSI-PTDM prediction model was installed at a doctor workstation and operated in a real clinic environment for 4 months. A total of 692,949 patients were monitored, including 484 patients with confirmed pulmonary tuberculosis. The model predicted 440 cases of pulmonary tuberculosis. The positive sample recognition rate was 90.91%, the false-positive rate was 9.09%, the negative sample recognition rate was 96.17%, and the false-negative rate was 3.83%.
MSI-PTDM can process sparse data, dense data, and unstructured text data concurrently. The model adds a feature domain vector embedding the medical sparse features, and the single-valued sparse vectors are represented by multi-dimensional dense hidden vectors, which not only enhances the feature expression but also alleviates the side effects of sparsity on the model training. However, there may be information loss when features are extracted from text, and adding the processing of original unstructured text makes up for the error within the above process to a certain extent, so that the model can learn data more comprehensively and effectively. In addition, MSI-PTDM also allows interaction between features, considers the combination effect between patient features, adds more complex nonlinear calculation considerations, and improves the learning ability of the model. It has been verified using a test set and via deployment within an actual outpatient environment.
结核病是一种危险的传染病,在中国每年报告的病例数最多。预防漏诊对结核病的预防、治疗和康复具有重要影响。最早的肺结核预测模型主要使用传统图像数据结合神经网络模型。然而,单一数据源往往会遗漏重要信息,如主要症状和实验室检查结果,而这些信息在病历和检查等多源数据中是存在的。在本研究中,我们基于电子健康记录中的结构化和非结构化多源数据,提出了一种多流集成肺结核诊断模型。鉴于肺部专科医生数量有限且结核病患病率高,这种辅助诊断模型的应用可为临床环境做出重大贡献。
研究对象为2015年至2020年期间中国一家大型综合医院呼吸科和感染科的患者。通过质量控制流程共选取了95294份病历。每份记录包含结构化和非结构化数据。首先,创建结构化数据特征的数值表达式。然后,通过决策树模型、随机森林和梯度提升决策树(GBDT)进行特征工程。根据特征权重从高到低将特征纳入特征排除集。当该集合的重要性高于0.7时,此过程结束。最后,将包含的特征用于模型训练。此外,非结构化自由文本数据在字符级别进行分词,并在索引后输入模型。通过多流集成肺结核诊断模型(MSI-PTDM)进行肺结核预测,并将准确率、AUC、灵敏度和特异性等评估指标与XGBoost、Text-CNN、随机森林、支持向量机等的预测结果进行比较。
通过多种特征工程方法,选取了咯血、咳嗽等主要症状以及红细胞沉降率检查等20个特征因素,并根据中国肺结核诊断标准分析了影响因素。MSI-PTDM、XGBoost、Text-CNN、随机森林和支持向量机的曲线下面积值分别为0.9858、0.9571、0.9486、0.9428和0.9429。MSI-PTDM的灵敏度、特异性和准确率分别为93.18%、96.96%和96.96%。MSI-PTDM预测模型安装在医生工作站,并在实际临床环境中运行4个月。共监测了692949名患者,其中确诊肺结核患者484例。该模型预测了440例肺结核。阳性样本识别率为90.91%,假阳性率为9.09%,阴性样本识别率为96.17%,假阴性率为3.83%。
MSI-PTDM可以同时处理稀疏数据、密集数据和非结构化文本数据。该模型添加了一个嵌入医学稀疏特征的特征域向量,单值稀疏向量由多维密集隐藏向量表示,这不仅增强了特征表达,还减轻了稀疏性对模型训练的负面影响。然而,从文本中提取特征时可能会有信息损失,添加原始非结构化文本的处理在一定程度上弥补了上述过程中的误差,使模型能够更全面、有效地学习数据。此外,MSI-PTDM还允许特征之间进行交互,考虑了患者特征之间的组合效应,增加了更复杂的非线性计算考量,提高了模型的学习能力。已通过测试集验证并在实际门诊环境中进行了部署。