Larissa Maroni, Pedro Clarindo Silva, Rafael Kunst, Ricardo Francalacci Savaris
{"title":"使用贝叶斯定理和神经网络诊断异位妊娠:回顾性队列研究的验证。","authors":"Larissa Maroni, Pedro Clarindo Silva, Rafael Kunst, Ricardo Francalacci Savaris","doi":"10.61622/rbgo/2026rbgo12","DOIUrl":null,"url":null,"abstract":"<p><strong>Objective: </strong>To evaluate the accuracy of neural networks and Naïve Bayes models in diagnosing ectopic pregnancy, using clinical data, hCG levels, and transvaginal ultrasound findings from a real dataset.</p><p><strong>Methods: </strong>This was a retrospective cohort study based on a public dataset of 2,495 first-trimester pregnant women with confirmed pregnancy under 13 weeks, documented transvaginal ultrasound reports, and follow-up on pregnancy outcome. The cohort presented a natural imbalance (8.5% ectopic, 91.5% intrauterine pregnancies), reflecting real-world clinical prevalence. Data on risk factors, clinical symptoms, ultrasound findings, and serial hCG levels were included. The dataset was preprocessed and split into training (80%) and testing (20%) sets using stratified sampling based on pregnancy outcome to preserve the proportion of ectopic cases in both sets. The main outcome measures were accuracy, sensitivity, specificity, and F1 score.</p><p><strong>Results: </strong>The neural network model achieved an accuracy of 99.4%, sensitivity of 94.6%, specificity of 97.2%, and an F1 score of 95.9%. The Naïve Bayes model showed an accuracy of 96.5%, sensitivity of 98.1%, specificity of 71.2%, and an F1 score of 82.5%. Both models were validated without evidence of overfitting.</p><p><strong>Conclusion: </strong>The neural network model demonstrated statistically significant superior accuracy and reliability in diagnosing ectopic pregnancy compared to the Naïve Bayes model (McNemar's test, p < 0.001), suggesting the potential of machine learning models, particularly deep learning, to enhance early diagnosis and clinical decision-making.</p>","PeriodicalId":74699,"journal":{"name":"Revista brasileira de ginecologia e obstetricia : revista da Federacao Brasileira das Sociedades de Ginecologia e Obstetricia","volume":"48 ","pages":""},"PeriodicalIF":1.4000,"publicationDate":"2026-03-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13078510/pdf/","citationCount":"0","resultStr":"{\"title\":\"Diagnosing ectopic pregnancy using the bayes theorem and neural network: a validation of a retrospective cohort study.\",\"authors\":\"Larissa Maroni, Pedro Clarindo Silva, Rafael Kunst, Ricardo Francalacci Savaris\",\"doi\":\"10.61622/rbgo/2026rbgo12\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p><strong>Objective: </strong>To evaluate the accuracy of neural networks and Naïve Bayes models in diagnosing ectopic pregnancy, using clinical data, hCG levels, and transvaginal ultrasound findings from a real dataset.</p><p><strong>Methods: </strong>This was a retrospective cohort study based on a public dataset of 2,495 first-trimester pregnant women with confirmed pregnancy under 13 weeks, documented transvaginal ultrasound reports, and follow-up on pregnancy outcome. The cohort presented a natural imbalance (8.5% ectopic, 91.5% intrauterine pregnancies), reflecting real-world clinical prevalence. Data on risk factors, clinical symptoms, ultrasound findings, and serial hCG levels were included. The dataset was preprocessed and split into training (80%) and testing (20%) sets using stratified sampling based on pregnancy outcome to preserve the proportion of ectopic cases in both sets. The main outcome measures were accuracy, sensitivity, specificity, and F1 score.</p><p><strong>Results: </strong>The neural network model achieved an accuracy of 99.4%, sensitivity of 94.6%, specificity of 97.2%, and an F1 score of 95.9%. The Naïve Bayes model showed an accuracy of 96.5%, sensitivity of 98.1%, specificity of 71.2%, and an F1 score of 82.5%. Both models were validated without evidence of overfitting.</p><p><strong>Conclusion: </strong>The neural network model demonstrated statistically significant superior accuracy and reliability in diagnosing ectopic pregnancy compared to the Naïve Bayes model (McNemar's test, p < 0.001), suggesting the potential of machine learning models, particularly deep learning, to enhance early diagnosis and clinical decision-making.</p>\",\"PeriodicalId\":74699,\"journal\":{\"name\":\"Revista brasileira de ginecologia e obstetricia : revista da Federacao Brasileira das Sociedades de Ginecologia e Obstetricia\",\"volume\":\"48 \",\"pages\":\"\"},\"PeriodicalIF\":1.4000,\"publicationDate\":\"2026-03-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13078510/pdf/\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Revista brasileira de ginecologia e obstetricia : revista da Federacao Brasileira das Sociedades de Ginecologia e Obstetricia\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.61622/rbgo/2026rbgo12\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"2026/1/1 0:00:00\",\"PubModel\":\"eCollection\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Revista brasileira de ginecologia e obstetricia : revista da Federacao Brasileira das Sociedades de Ginecologia e Obstetricia","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.61622/rbgo/2026rbgo12","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/1/1 0:00:00","PubModel":"eCollection","JCR":"","JCRName":"","Score":null,"Total":0}
Diagnosing ectopic pregnancy using the bayes theorem and neural network: a validation of a retrospective cohort study.
Objective: To evaluate the accuracy of neural networks and Naïve Bayes models in diagnosing ectopic pregnancy, using clinical data, hCG levels, and transvaginal ultrasound findings from a real dataset.
Methods: This was a retrospective cohort study based on a public dataset of 2,495 first-trimester pregnant women with confirmed pregnancy under 13 weeks, documented transvaginal ultrasound reports, and follow-up on pregnancy outcome. The cohort presented a natural imbalance (8.5% ectopic, 91.5% intrauterine pregnancies), reflecting real-world clinical prevalence. Data on risk factors, clinical symptoms, ultrasound findings, and serial hCG levels were included. The dataset was preprocessed and split into training (80%) and testing (20%) sets using stratified sampling based on pregnancy outcome to preserve the proportion of ectopic cases in both sets. The main outcome measures were accuracy, sensitivity, specificity, and F1 score.
Results: The neural network model achieved an accuracy of 99.4%, sensitivity of 94.6%, specificity of 97.2%, and an F1 score of 95.9%. The Naïve Bayes model showed an accuracy of 96.5%, sensitivity of 98.1%, specificity of 71.2%, and an F1 score of 82.5%. Both models were validated without evidence of overfitting.
Conclusion: The neural network model demonstrated statistically significant superior accuracy and reliability in diagnosing ectopic pregnancy compared to the Naïve Bayes model (McNemar's test, p < 0.001), suggesting the potential of machine learning models, particularly deep learning, to enhance early diagnosis and clinical decision-making.