Early Warning Systems For Malaria Outbreaks in Thailand: An Anomaly Detection Approach

preprint OA: gold CC-BY-4.0
📄 Open PDF Full text JSON View at publisher

Abstract

Abstract Background Malaria continues to pose a significant health threat. Rapid identification of malaria infections and the deployment of active surveillance tools are crucial for achieving malaria elimination in Thailand. In this study, we introduce an anomaly detection system as an early warning mechanism for potential malaria outbreaks in the country. Methods We developed and compared statistical, machine learning, and threshold-based anomaly detection algorithms to identify atypical malaria activity in Thailand. Additionally, we designed a user interface tailored for anomaly detection, enabling the Thai malaria surveillance team to utilize these algorithms and visualize regions exhibiting unusual malaria patterns. Results We formulated nine distinct anomaly detection algorithms. Their efficacy in pinpointing verified outbreaks was assessed using malaria case data from Thailand spanning 2012 to 2022. The historical average threshold-based anomaly detection method triggered three times fewer alerts, while correctly identifying the same number of verified outbreaks. A limitation of this analysis is the small number of verified outbreaks; further consultation with the Division of Vector Borne Disease could help identify more verified outbreaks. The developed dashboard, designed specifically for anomaly detection, allows disease surveillance professionals to easily identify and visualise unusual malaria activity at a provincial level across Thailand. Conclusion We propose an enhanced early warning system to bolster malaria elimination efforts in Thailand. The developed anomaly detection algorithms, after thorough comparison, have been optimized for seamless integration with the current malaria surveillance infrastructure. An anomaly detection dashboard for Thailand is built and supports early detection of abnormal malaria activity. In summary, our proposed early warning system enhances the identification process for provinces at risk of outbreaks and offers easy integration with Thailand’s established malaria surveillance framework.
Full text 111,773 characters · extracted from preprint-html · click to expand
Early Warning Systems For Malaria Outbreaks in Thailand: An Anomaly Detection Approach | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Early Warning Systems For Malaria Outbreaks in Thailand: An Anomaly Detection Approach Oraya Srimokla, Wirichada Pan-Ngum, Amnat Khamsiriwatchara, Chantana Padungtod, and 3 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-3432453/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Background Malaria continues to pose a significant health threat. Rapid identification of malaria infections and the deployment of active surveillance tools are crucial for achieving malaria elimination in Thailand. In this study, we introduce an anomaly detection system as an early warning mechanism for potential malaria outbreaks in the country. Methods We developed and compared statistical, machine learning, and threshold-based anomaly detection algorithms to identify atypical malaria activity in Thailand. Additionally, we designed a user interface tailored for anomaly detection, enabling the Thai malaria surveillance team to utilize these algorithms and visualize regions exhibiting unusual malaria patterns. Results We formulated nine distinct anomaly detection algorithms. Their efficacy in pinpointing verified outbreaks was assessed using malaria case data from Thailand spanning 2012 to 2022. The historical average threshold-based anomaly detection method triggered three times fewer alerts, while correctly identifying the same number of verified outbreaks. A limitation of this analysis is the small number of verified outbreaks; further consultation with the Division of Vector Borne Disease could help identify more verified outbreaks. The developed dashboard, designed specifically for anomaly detection, allows disease surveillance professionals to easily identify and visualise unusual malaria activity at a provincial level across Thailand. Conclusion We propose an enhanced early warning system to bolster malaria elimination efforts in Thailand. The developed anomaly detection algorithms, after thorough comparison, have been optimized for seamless integration with the current malaria surveillance infrastructure. An anomaly detection dashboard for Thailand is built and supports early detection of abnormal malaria activity. In summary, our proposed early warning system enhances the identification process for provinces at risk of outbreaks and offers easy integration with Thailand’s established malaria surveillance framework. Infectious Diseases Early Warning Systems Malaria Anomaly Detection Machine Learning Figures Figure 1 Figure 2 Figure 3 Background Malaria remains a life-threatening and preventable disease in many parts of the world[ 1 ]. While significant progress in reducing Thai malaria cases has occurred in the past two decades, continued efforts are necessary to achieve elimination[ 2 , 3 ]. The Operational Plan 2017–2021, aligned with Thailand’s National Malaria Elimination Strategy 2017–2026, emphasises the need to enhance rapid identification of infections and implement timely and active surveillance and response measures to prevent further transmission [ 4 ]. The Division of Vector-Borne Disease (DVBD) leads the national malaria program and is responsible for implementing surveillance initiatives in Thailand [ 3 ]. The DVBD, operating under the Department of Disease Control of the Ministry of Public Health, facilitated and oversees real-time aggregation of electronic malaria case data [ 4 , 5 ]. The electronic malaria information system (eMIS) was developed by the Center of Excellence for Biomedical and Public Health Informatics (BIOPHICS), Faculty of Tropical Medicine at Mahidol University aiming to replace paper-based malaria reporting with near-real-time electronic reporting [ 5 ]. BIOPHICS currently hosts all eMIS data, acting as the ongoing technical system support for the ministry [ 5 ]. With the development of eMIS, Thailand has conducted the 1-3-7 strategy to improve malaria elimination [ 6 ]. This strategy involves notifying each malaria case within 1 day of testing positive for malaria, classifying the case within 3 days, and completing a response within 7 days [ 6 ]. Responses include blood sampling, distributing insecticide-treated bed nets, indoor residual spraying, and health education and depend on case classification [ 4 ]. Seasonal malaria chemoprevention (SMC) has been used as preventative treatment in areas with seasonal transmission and require adaptable thresholds to define disease patterns over time and space. These thresholds are used as a surveillance method to identify suitable areas for SMC and require input from health districts as they are often challenging to define [ 7 ]. Overall, these methods require a broad workforce, high data quality, continued leadership, and are costly. To successfully eliminate malaria in Thailand, it is crucial to incorporate well supported community-based health workers and establish an affordable and efficient detection system. This system should quickly identify outbreaks in their early stages, be adaptable to various health districts’ needs, and reduce the malaria burden more rapidly in the remaining localised high transmission foci [ 8 ]. Early warning systems give advance warnings of impending epidemics and play a crucial role in the malaria surveillance program overseen by the Division of Vector Borne Disease (DVBD) [ 9 , 10 ]. Malaria outbreaks are defined as higher than usual malaria case activity in a specific area. Currently, the warning system relies on a three-year median approach, where an alert is triggered if weekly malaria cases exceed the three-year median of weekly cases from previous years and prompt investigation by the DVBD [ 11 ]. The publicly available online dashboard for the Thailand Malaria Elimination Program ( https://malaria.ddc.moph.go.th/malariaR10/index_newversion.php ), provides information on provincial case counts, weekly case counts, three-year median thresholds, and the implementation of the 1-3-7 strategy throughout Thailand. This tool provides general case visualisation across Thailand, but it does not support identification of unusual malaria case activity across Thailand [ 11 ]. The development of improved early warning mechanisms and a robust dashboard is needed to optimise the response time and allocation of resources to areas with impending epidemics and to support effective implementation of preventive measures. Anomaly detection is used to discover unexpected or rate events in data streams and can be applied to health data to identify outliers in a system [ 12 ]. Anomaly detection algorithms are dynamic and can include a combination of statistical and machine learning approaches and threshold-based methods that detect highly abnormal activities in the data. Examples of uses are fraud detection in insurance and banking, intrusion detection of computer networks, and medical informatics for disorder detection [ 12 ]. Three types of machine learning-based anomaly detection algorithms are supervised, unsupervised, and semi-supervised [ 13 ]. While no single anomaly detection method is universally effective, several approaches are suited for time series anomaly detection. These approaches include predictive confidence levels, statistical profiling, clustering, and density-based profiling [ 13 , 14 ]. Anomaly detection algorithms are a promising technique for early identification of abnormal malaria activity, but no existing research has applied statistical and machine learning-based anomaly detection algorithms to malaria case data. Existing early warning systems could be improved by designing anomaly detection algorithms for Thai malaria case data. Aims and Objectives The aim of this research is to propose an early detection system to support the malaria elimination program in Thailand and to improve methods for early detection of malaria in areas with impending outbreaks. To achieve this aim, the main research objectives are: Develop anomaly detection algorithms and early detection thresholds that are suitable for malaria data in Thailand. Compare the developed algorithms to Thailand’s current early warning threshold. Develop a prototype user interface for Thai public health professionals that supports early identification of outbreaks and enables focused attention on anomalous areas. Methods To support the objectives of this study, the methods are separated into five main sections: data, algorithms, algorithm comparison, code structure, and user interface. Data The data for this analysis was provided by the Ministry of Public Health and used under a research protocol approved by the Ethics Committee of the Faculty of Tropical Medicine, Mahidol University, Bangkok. The data contains Thailand malaria cases reported from 2012 to 2022 with personal identifiers excluded from the analyses. The data contains 31 variables including the blood draw date, nationality, sex, age, province, province ID, subdistrict, species of malaria, border type, occupation, and treatment for 180256 observations of malaria cases. All province names are translated into English based on their provincial ID (details in Additional file 1). The data is transformed into incidence data based on the case counts per date and then grouped based on province for further analysis. Initial visualisation of the data is shown (see Fig. 1 and Additional file 2) and can be further visualised in the analytics tab of the final dashboard: https://moru.shinyapps.io/Malaria Anomaly Detection App/. Monthly precipitation and temperature data from the Climate Change Knowledge Portal is incorporated into some machine learning methods [ 15 ]. The dataset contains monthly precipitation and temperature from 2012 to 2021 and is added to the corresponding malaria case data from BIOPHICS. The data was interpolated to produce daily values (details in Additional file 2) and scaled to be comparable to the malaria case data. The scaled case, temperature, and precipitation data are used in the unsupervised clustering methods. Anomaly Detection Algorithms Two main types of anomaly detection algorithms developed are statistical and machine learning-based methods, and threshold-based methods. Each method will be used to identify anomalous or unusual malaria activity. The performance for each type of anomaly detection algorithm is compared in the following section. Table 1 shows the methods used for this analysis. Table 1 Methods used for anomaly detection and their references Method References Statistical Profiling [ 14 , 24 ] Predictive Confidence Interval [ 14 ] Unsupervised Clustering 1 [ 23 , 25 – 28 ] Weekly Case Comparison [ 4 ] Monthly Case Comparison [ 29 ] Rolling Historical Average 2 Weekly Three-Year Median [ 11 ] 1 Two main unsupervised clustering techniques are used for this method: time-series clustering with tsclust [ 23 ] and density based clustering using DBSCAN. 2 This method was developed based on a combination of techniques from statistical profiling and weekly case comparison. Anomaly detection algorithms based on statistical or machine learning approaches include statistical profiling, predictive confidence interval, unsupervised time-series clustering, unsupervised density-base clustering with the malaria case data, and unsupervised density-based clustering with the malaria case data in combination with precipitation and temperature data (see additional file 11 for detailed descriptions). Threshold-based anomaly detection algorithms define a threshold based on previous malaria case counts, including weekly and monthly malaria case comparisons, rolling historical averages, and weekly three-year median case comparisons (see additional file 11 for detailed descriptions). As an initial test, early detection methods are applied and visualised at a provincial level to see if unusual case activity can be identified using this dataset. All methods can be selected in the dropdown menu in the analytics tab of the final dashboard ( https://moru.shinyapps.io/Malaria Anomaly Detection App/) and are grouped by machine-learning-based (orange) or threshold and statistical-based (blue) (see Fig. 3 ). Algorithm Validation and Comparison To validate the algorithms, additional literature review, the online Thailand Malaria Elimination Program tool, and consultation with BIOPHICS provided information on dates and provinces where malaria outbreaks were previously reported. To match available malaria data, outbreaks reported from 2012 to 2022 were selected. The two main goals for the validation stage is to identify the number of outbreaks caught for each method up to two weeks prior to the verified outbreak date, and the number of alerts triggered by each method. From literature, the Thailand Malaria Elimination Program online tool, and consultation with BIOPHICS, 7 outbreak dates were identified. 6 of the 7 outbreaks were reported at a provincial level while 1 (2017 Kanchanaburi) was reported at a subdistrict level. Reported outbreaks are generally clustered along provinces bordering Laos, Cambodia, and Myanmar and could have resulted from factors like migrant movement, limited access to malaria prevention and diagnostics, inadequate monitoring measures, dense forest regions, and political and social unrest [ 16 ]. The summary of outbreak dates are shown in Table 2 (see additional file 12 for detailed descriptions). Table 2 Outbreak dates reported in literature from 2012 and 2022 Date Reported Province Refence 2014 Ubon Ratchathani [ 30 ] 2015 Ubon Ratchathani [ 30 ] 2016 Yala [ 31 ] 2017 Si Sa Ket [ 29 ] 2017 Kanchanaburi [ 31 ] 2022 Kanchanaburi [ 31 ] 1 2022 Tak [ 32 ] 1 1 Additional analysis of case data shows large spike and from consultation with BIOPHICS. All anomaly detection methods are run through all the provinces. Each province and method was assessed to determine if it could generate warnings within a two-week window leading up to the outbreak date. The exact outbreak date, shown as a peak in cases, is found using the Thailand Malaria Elimination Program online tool and compared to estimates reported in literature. The function summed the total real outbreak dates each method caught and the total number of alerts each method produced. Algorithm 1 for this function is shown below and the final results from testing is shown in the analytics tab of the final dashboard. In addition to reporting verified outbreaks, the total number of alerts reported from each method are also tracked. Each anomaly detection method is applied to all the malaria data from 2012 to 2022 and reports the number of anomalies or alerts each method triggers. The purpose of tracking these alerts is to ensure that the method used for anomaly detection is not highly sensitive to every irregularity found in the case data and reporting is done for only highly anomalous activity. Code Structure The code is structured to conduct anomaly analysis at a provincial level, with a user-defined method, time frame, and malaria species (see Additional file 10). The data is converted into incidence data based on the resolution of analysis and grouped at a provincial level. The resolution of analysis can be increased to smaller regions; however, this will be more computationally intensive. After the user-specified method is applied to each province, the daily anomalous activity is reported for the time frame defined and stored in an outer data frame. The final activity data frame is used for further analysis and is connected to visualisations in the user interface in the form of a map highlighting anomalous provinces. Interface The user interface is designed for the DVBD surveillance team with consultation through BIOPHICS. For easy visualization and prototyping, a wireframe of the inter-face was developed using Canva [ 17 ]. An R Shiny application was developed to test and debug functions, integrating visualization tools like raster, rworldmap, and ggplot to highlight anomalous activities [ 18 – 21 ]. The final application was created using R Shiny and bs4Dash and has three main pages [ 22 ]. The first page describes the project and the algorithms available for analysis. The second page provides a weekly summary, including information on provinces with detected anomalies. The third page allows the user to conduct further analysis by inputting the time frame, method, and species of malaria used for analysis. Two main visualisations are updated every time a new analysis is initiated: one highlighting provinces with anomalies detected and another showing the standardised incidence ratio of malaria incidence across Thailand. Additional information such as trend lines, percentage of provinces with anomalies detected, and names of provinces with unusual activity are also included. Results Algorithm Development and Validation A total of 9 anomaly detection algorithms were created and initially tested and visualised to confirm correctly implemented alerts were produced for observations exceeding thresholds or bands defining anomalous activity for the Tak province (see Fig. 2 and Additional file 3). From this initial test, anomalous observations are distinguished from normal malaria case activity. After the anomaly detection algorithms were developed and validated with the Tak province, their performances were compared and their results are shown in Table 3 . As described in section 2.3, the highest number of verified anomalies found was 6 out of the 7. Methods able to identify 6 outbreaks were historical average, weekly case counts, and the weekly three-year median method. Of these three methods, the historical average method had the lowest number of alerts produced (see Additional file 4 for visualisations of true anomalies caught using the historical average and DBSCAN method applied to Ubon Ratchathani). Of the 9 methods, 4 methods were unable to identify the labelled outbreaks. These methods are density-based profiling with DBSCAN, density-based profiling with DBSCAN including temperature and precipitation data, unsupervised clustering with tsclust [ 23 ], and monthly case comparison. The method reporting the most alerts is the weekly three-year median while the method reporting the lowest number of alerts is density-based profiling with DBSCAN. Table 3 Results from Method Comparison Method Ubon(2014) 3 Ubon(2015) 3 Yala(2016) SSK(2017) 3 KCN(2017) 3 KCN(2022) Tak(2022) Verified Anomalies Detected(%) Total Reported 4 Statistical Profiling × × √ × × × × 1 (14%) 882 Predictive Confidence Interval √ × √ √ × × × 3 (43%) 2356 Unsupervised Clustering × × × × × × × 0 (0%) 75 Density-Based Profiling × × × × × × × 0 (0%) 5 Density-Based Profiling w/T&P 1 × × × × × × × 0 (0%) 452 Historical Average × √ √ √ √ √ √ 6 (86%) 10875 Weekly Case Previous Year √ × √ √ √ √ √ 6 (86%) 30449 Monthly Case Four Years × × × × × × × 0 (0%) 5577 Weekly Three-Year Median 2 √ √ √ √ × √ √ 6 (86%) 32630 1 Temperature and precipitation included in analysis 2 Baseline method used in Thailand (BIOPHICS) 3 Ubon: Ubon Ratchathani, SSK: SI Sa Ket, KCN: Kanchanaburi 4 Total anomalies repored for each method when applied to all malaria cases between 2012 and 2022. Code Structure and Functionalisation After the algorithms’ performance were tested, they were converted into functions with easily adaptable outbreak definitions. Data handling and filtering functions are created to allow user input into the analysis. Additional functions were created to run anomaly detection algorithms across all provinces based on user-defined inputs such as malaria species and time period for analysis, and to store the anomaly status of each province for map visualisation. The code structure (see Fig. 2 ) was achieved. All the code files can also be found here: https://github.com/mghDissertation/malaria anomaly detect. User Interface To aid in crafting the optimal design and layout for the final dashboard, a wireframe was developed (refer to Additional file 5), specifically tailored for anomaly detection. An intermediate application (refer to Additional file 5) was utilized to validate code functionality, offering a visual depiction of provinces marked for atypical malaria activity. The dashboard’s design was refined based on feedback from BIOPHICS and fellow researchers, ensuring effective anomaly detection and granting users the flexibility to choose essential parameters. The final dashboard contains three main pages with information on methods, generated visuals, and method-specific accuracy. The aim is to allow users to easily compare different methods, species, and time frames used for analysis. The final dashboard, as shown in Fig. 3 and Additional file 5, will feature the best method on its summary page for DVBD’s use. The final application is hosted here: https://moru.shinyapps.io/Malaria Anomaly Detection App/. Discussion The creation of effective anomaly detection algorithms combined with a user inter-face tailored for anomaly detection supports progress towards the Thailand Malaria Elimination Program. Algorithms Based on the algorithm evaluation, three methods historical average, weekly case comparison, and weekly three-year median identified 86% of the labeled outbreaks. As observed in Table 3 , each of these three methods detected either 6 or 7 outbreaks. The historical average method was able to detect all verified outbreak dates except for the 2014 Ubon Rachathani outbreak. Given that the dataset begins in 2012 and the historical average method requires data from the previous three years, the alert threshold value might have been set higher than intended, preventing the alert from being triggered. In contrast, the weekly case comparison method identified all verified outbreaks except for the 2015 Ubon Ratchathani observation. The weekly case comparison method relies on the weekly cumulative counts from the previous year and because an outbreak was reported in Ubon Ratchathani from the previous year, a slight decrease in case values would not have been able to trigger an alert for this method even if an outbreak was declared. Similarly, the three-year median method identified all outbreaks except for the one in Kanchanaburi in 2017. Since this outbreak was reported at a subdistrict level, it was more difficult to catch these irregularities when the analysis was completed at a provincial level. Other methods that failed to detect this subdistrict outbreak include statistical profiling, predictive confidence interval, unsupervised clustering with tsclust package [ 23 ], density-based profiling using only case data, density-based profiling combining case data with temperature and precipitation data, and monthly case comparison. Although the currently implemented three-year median method identified 6 out of 7 actual outbreaks, it generated approximately three times as many predictions (or total reported alerts) compared to the historical average method. The primary objective of these algorithms is to guide the DVBD on which areas to prioritize, especially in resource-limited scenarios, to preemptively control potential outbreaks. In practice, a low false positive rate combined with a high true positive rate is crucial for DVBD to effectively respond to outbreaks. The statistical profiling method detected 14.2% of the labeled outbreaks, while the predictive confidence interval method detected 43%. Despite having fewer alerts, these methods outperformed others in accuracy. For instance, the statistical profiling method identified anomalies solely for the 2016 Yala outbreak. In contrast, the predictive confidence interval method detected the 2016 Yala outbreak and also the 2017 Si Sa Ket and 2014 Ubon Ratchathani outbreaks. By collaborating further with the DVBD, we can determine acceptable false positive rates and sensitivity levels. This will help in refining the customization of warning methods for specific health districts. Regarding machine-learning-based methods, techniques such as unsupervised clustering with tsclust [ 23 ] and DBSCAN with malaria case data did not identify any labeled outbreak data. This was also the case when combining malaria case data with precipitation and temperature metrics. While these methods were tested at a provincial level, their outcomes might vary when implemented at district or village levels. Compared to threshold-based methods, statistical and machine-learning-based anomaly detection methods showed lower accuracy in identifying verified outbreaks when tested with malaria data from 2012 to 2022. From Table 3 , we see that different methods were able to capture different anomalous activities. A combination of these methods can be used to capture different types of anomalies across Thailand and should be tested with more verified outbreak dates. In this context, the historical average method outperformed others due to its high accuracy in identifying outbreaks and its low false positive rate. Observations deemed anomalous are categorized based on threshold definitions. These thresholds can be adjusted to match the tolerance levels set by health districts, akin to the criteria used for SMC area identification. Depending on the application and scenario, tailored algorithm thresholds can be designed based on health district needs. Easy integration is possible as all methods and code are functionalized and adaptable to requirements set by different health districts. User Interface The final dashboard, tailored specifically for anomaly detection, has been designed to be user-friendly, allowing disease surveillance professionals to easily navigate and interact with the detection algorithms. It offers tools for visualizing anomalies and user-defined analysis parameters, and it facilitates in-depth analysis of atypical patterns in malaria data. The dashboard application has three main pages. The ’Introduction’ page presents the application’s objectives and methodologies. The ’Summary’ page provides weekly insights on anomalous provinces and malaria cases, categorized by border types, based on a default method determined by the health district. The analysis page allows users to expand their analysis through user-defined methods, malaria species, and time frames. Its core aim is to showcase how different methods and time frames affect provincial alerts. Method options are grouped into machine-learning and statistical (orange) or threshold-based (blue) in a dropdown methods section in the analysis page of the dashboard. The analysis page provides step-by-step guidance, highlighting anomalous provinces on a map and showing standardised malaria incidence across Thailand. After each analysis, anomalous provinces are listed, and an interactive widget displays malaria cases over time per province. Limitations Certain limitations were present in this study. For specific statistical methods, we relied on literature to classify anomalies as values surpassing 3 standard deviations above the mean. As each province follows its own protocol for defining malaria out-breaks and resource allocation, collaborating with different health districts to establish outbreak thresholds is essential to identify the most suitable method for them. This cooperative approach, combined with user feedback for both the algorithms and user interface, can help identify the most suitable anomaly detection method for each province. For the dataset used, observations started in 2012 and ended in May 2022, and lacks real-time integration with the malaria reporting database. Although functions are compatible with raw data, real-time integration should be conducted. Though our analysis focused developing a proof-of-concept on a provincial level for efficiency, it could be extended to subdistrict or sub village scales to represent the surveillance resolution implemented in the 1-3-7 program. More outbreak data points and working directly with the DVBD surveillance team would improve validation, algorithm sensitivity, and the final interface. Conclusions We propose an enhanced early warning system to bolster malaria elimination efforts in Thailand. Statistical, machine learning, and threshold-based methods were developed and compared. Compared to the current method analyzing malaria case data from 2012 to 2022, the historical average-based method demonstrated equivalent sensitivity with a reduced false positive rate. We developed a user interface tailored for anomaly detection, which aids in early detection by summarizing anomalies on a weekly basis across provinces. The code has been optimized for functionality and is configured to synchronize with the real-time malaria database. The anomaly detection algorithms could be integrated at the case identification stage of the 1-3-7 protocol and applied at a sub village level. This approach would assist in determining the allocation of resources to prevent the spread of atypical malaria cases. The proposed early warning system enhances the timely identification of provinces at risk of epidemics and seamlessly integrates with Thailand’s malaria surveillance system. Abbreviations DVBD: Division of Vector Borne Disease eMIS: Electronic Malaria Information System BIOPHICS: Center of Excellence for Biomedical and Public Health Informatics DBSCAN: Density-Based Spatial Clustering of Applications with Noise WHO: World Health Organization SMC: Seasonal Malaria Chemoprevention ARIMA: Autoregressive Integrated Moving Average Declarations Competing interests: The authors declare no competing interests. Ethics approval and consent to participate This study was based on aggregate P. vivax surveillance data in Thailand, provided by the Ministry of Health. No confidential information was included because mathematical analyses were performed at the aggregate level. All methods were performed under a research protocol approved by the Ethics Committee of the Faculty of Tropical Medicine, Mahidol University, Bangkok (reference TMEC 22-056). Code availability The code is available on Github at (https://github.com/mghDissertation/malaria anomaly detect). Availability of data and materials The Thai malaria data is not publishable, however, a summary of the data is found in Additional file 2. Additional file 6 outlines the outbreak dates used for the method comparison section. The precipitation and temperature data can be found on the Climate Knowledge Portal (https://climateknowledgeportal.worldbank.org/) and is visualised in Additional file 2. Additional file 7 and 8 shows the precipitation and temperature data used for this report. The provincial population data is available through the National Statistical Office (http://statbbi.nso.go.th/staticreport/page/ sector/en/01.aspx)(details in Additional file 9). Funding This research was funded in part by the Wellcome Trust (Grant number 220211). For the purposes of open access, the authors have applied a CC BY public copyright license to any Author Accepted Manuscript version arising from this submission. Authors’ contributions Conceptualisation: OS, WPN, SS Formal Analysis: OS Software: OS Visualisation: OS Data Curation: OS, WPN, AK Methodology: OS, SS Validation: OS, WPN, AK Writing and Editing: OS, WPN, SS All authors reviewed the manuscript. References Fact sheet about malaria [https://www.who.int/news-room/fact-sheets/detail/malaria] Chareonviriyaphap T, Bangs MJ, Ratanatham S: Status of malaria in Thailand. Southeast Asian J Trop Med Public Health 2000, 31: 225-237. Thailand gears up to eliminate malaria by 2024 [https://www.who.int/news-room/feature-stories/detail/thailand-gears-up-to-eliminate-malaria-by-2024] Lertpiriyasuwat C, Sudathip P, Kitchakarn S, Areechokchai D, Naowarat S, Shah JA, Sintasath D, Pinyajeerapat N, Young F, Thimasarn K, et al: Implementation and success factors from Thailand's 1-3-7 surveillance strategy for malaria elimination. Malar J 2021, 20: 201. Ma S, Lawpoolsri S, Soonthornworasiri N, Khamsiriwatchara A, Jandee K, Taweeseneepitch K, Pawarana R, Jaiklaew S, Kijsanayotin B, Kaewkungwal J: Effectiveness of Implementation of Electronic Malaria Information System as the National Malaria Surveillance System in Thailand. JMIR Public Health Surveill 2016, 2: e20. Shah JA: Learnings from Thailand in building strong surveillance for malaria elimination. Nat Commun 2022, 13: 2677. Jongdeepaisal M, Khonputsa P, Prasert O, Maneenet S, Pongsoipetch K, Jatapai A, Rotejanaprasert C, Sudathip P, Maude RJ, Pell C: Forest malaria and prospects for anti-malarial chemoprophylaxis among forest goers: findings from a qualitative study in Thailand. Malar J 2022, 21: 47. Smithuis FM, White NJ: Spend wisely to eliminate malaria. Lancet Infect Dis 2022, 22: e171-e175. Konchom S, Singhasivanon P, Kaewkungwal J, Chuprapawan S, Thimasarn K, Kidson C, Yimsamran S, Rojanawatsirivet C: Early detection of malaria in an endemic area: model development. Southeast Asian J Trop Med Public Health 2006, 37: 1067-1071. Maharaj R: Early warning systems for the detection of malaria outbreaks. Indian J Med Res 2017, 146: 560-562. Thailand Malaria Elimination Program [https://malaria.ddc.moph.go.th/malariar10/index_newversion.php] Anomaly Detection: Definition, Best Practices and Use Cases [https://www.datrics.ai/anomaly-detection-definition-best-practices-and-use-cases] what is anomaly detection [https://developer.ibm.com/learningpaths/get-started-anomaly-detection-api/what-is-anomaly-detection/] Effective Approaches for Time Series Anomaly Detection [https://towardsdatascience.com/effective-approaches-for-time-series-anomaly-detection-9485b40077f1] Climate Change Knowledge Portal [https://climateknowledgeportal.worldbank.org/] Ammatawiyanon L, Tongkumchum P, Lim A, McNeil D: Modelling malaria in southernmost provinces of Thailand: a two-step process for analysis of highly right-skewed data with a large proportion of zeros. Malar J 2022, 21: 334. Canva [https://www.canva.com/] shiny: Web Application Framework for R [https://shiny.posit.co/] raster: Geographic Data Analysis and Modeling [https://cran.r-project.org/web/packages/raster/index.html] rworldmap: R package for mapping global data [https://github.com/AndySouth/rworldmap/] ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics [https://cran.r-project.org/web/packages/ggplot2/index.html] bs4Dash: A 'Bootstrap 4' Version of 'shinydashboard' [https://rinterface.github.io/bs4Dash/index.html] Montero P, Vilar JA: TSclust: An R Package for Time Series Clustering. Journal of Statistical Software 2014, 62: 1 - 43. 5 Ways to Detect Outliers/Anomalies That Every Data Scientist Should Know (Python Code) [https://towardsdatascience.com/5-ways-to-detect-outliers-that-every-data-scientist-should-know-python-code-70a54335a623] Thang TM, Kim J: The Anomaly Detection by Using DBSCAN Clustering with Multiple Parameters. In 2011 International Conference on Information Science and Applications ; 26-29 April 2011 2011: 1-5. How to do DBSCAN clustering in R? [https://www.projectpro.io/recipes/do-dbscan-clustering-r] DBSCAN Algorithm for Fraud Detection & Outlier Detection in a Data set [https://medium.com/@dilip.voleti/dbscan-algorithm-for-fraud-detection-outlier-detection-in-a-data-set-60a10ad06ea8] Sahu RT, Verma MK, Ahmad I: Density-based spatial clustering of application with noise approach for regionalisation and its effect on hierarchical clustering. International Journal of Hydrology Science and Technology 2023, 16: 240-269. Roh ME, Lausatianragit K, Chaitaveep N, Jongsakul K, Sudathip P, Raseebut C, Tabprasit S, Nonkaew P, Spring M, Arsanok M, et al: Civilian-military malaria outbreak response in Thailand: an example of multi-stakeholder engagement for malaria elimination. Malar J 2021, 20: 458. Regional Office for South-East Asia WHO: Programmatic review of the national malaria programme in Thailand: summary report. New Delhi: WHO Regional Office for South-East Asia; 2016. Bureau of Vector Borne Diseases DoDC, Ministry of Public Health: Guide to Malaria Elimination For Thailand’s Local Administrative Organizations and the Health Network. Nonthaburi: Bureau of Vector Borne Diseases; 2019. Mercado CEG, Lawpoolsri S, Sudathip P, Kaewkungwal J, Khamsiriwatchara A, Pan-Ngum W, Yimsamran S, Lawawirojwong S, Ho K, Ekapirat N, et al: Spatiotemporal epidemiology, environmental correlates, and demography of malaria in Tak Province, Thailand (2012-2015). Malar J 2019, 18: 240. Additional Files Additional Files 1 to 12 are not available with this version. Algorithm Algorithm is not available with this version. Algorithm 1 Validation and Comparison. The pseudocode illustrates the steps used for validating and comparing various anomaly detection methods. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-3432453","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":239793322,"identity":"08667956-3c0b-4469-8cca-f3693a8ea2ea","order_by":0,"name":"Oraya Srimokla","email":"","orcid":"","institution":"Nuffield Department of Clinical Medicine, University of Oxford","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Oraya","middleName":"","lastName":"Srimokla","suffix":""},{"id":239793323,"identity":"22458844-a27f-44dd-87df-a07c953e5935","order_by":1,"name":"Wirichada Pan-Ngum","email":"","orcid":"https://orcid.org/0000-0002-9839-5359","institution":"Department of Tropical Hygiene, Faculty of Tropical Medicine, Mahidol University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Wirichada","middleName":"","lastName":"Pan-Ngum","suffix":""},{"id":239793324,"identity":"55f9dafd-a80a-4509-b574-2e10445b65de","order_by":2,"name":"Amnat Khamsiriwatchara","email":"","orcid":"","institution":"Center of Excellence for Biomedical and Public Health Informatics, Faculty of Tropical Medicine, Mahidol University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Amnat","middleName":"","lastName":"Khamsiriwatchara","suffix":""},{"id":239793325,"identity":"c9993dc2-f3d4-4f8b-940c-2250578764e5","order_by":3,"name":"Chantana Padungtod","email":"","orcid":"","institution":"Division of Vector Borne Diseases, Ministry of Public Health, Department of Disease Control","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Chantana","middleName":"","lastName":"Padungtod","suffix":""},{"id":239793326,"identity":"0fc5ecf6-6ce9-494c-8dee-6774ced532a6","order_by":4,"name":"Rungrawee Tipmontree","email":"","orcid":"","institution":"Division of Vector Borne Diseases, Ministry of Public Health, Department of Disease Control","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Rungrawee","middleName":"","lastName":"Tipmontree","suffix":""},{"id":239793327,"identity":"9727e819-2a8d-4d2d-99ec-330163dbfd51","order_by":5,"name":"Noppon Choosri","email":"","orcid":"https://orcid.org/0000-0003-2029-1610","institution":"College of Arts, Media and Technology, Chiang Mai University","correspondingAuthor":false,"submittingAuthor":false,"prefix":"","firstName":"Noppon","middleName":"","lastName":"Choosri","suffix":""},{"id":239793328,"identity":"c98ee11a-f5bd-4c12-9820-fcd8bc2c34c0","order_by":6,"name":"Sompob Saralamba","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAz0lEQVRIiWNgGAWjYLACxgYbKIuNeC1pEiRrOUyCFvn27rQHH3ecrzNv7z264UPZPTn5BuaHH/BpMThzdrvhzDO3JWTOnEu7OeNcsbHBATZjCbxaJHK3SfO23ZaQkMgxu83blpC4gYHBDL/DZoC1nINo+duWUD+/gf0bfs/cAGs5ANHC2JaQwHCAB78tUL8kS87gAfql51yC4YbDPMV4/SLf3rsNGGJ2/BLsvcdu/ChLkJdvb9+IN8QYEHHBA6WZCajHomUUjIJRMApGARoAAOBBSp653zApAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0000-0002-5460-8447","institution":"Mahidol-Oxford Tropical Medicine Research Unit, Faculty of Tropical Medicine, Mahidol University","correspondingAuthor":true,"submittingAuthor":false,"prefix":"","firstName":"Sompob","middleName":"","lastName":"Saralamba","suffix":""}],"badges":[],"createdAt":"2023-10-11 12:36:40","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-3432453/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-3432453/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":44811910,"identity":"816b0b6e-65e2-4996-9a71-887fd1bfafc8","added_by":"auto","created_at":"2023-10-17 22:08:19","extension":"jpg","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":662783,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eTotal Malaria Cases Across Thailand from 2012 to 2022.\u003c/strong\u003e The malaria case counts across Thailand are shown from 2012 to 2022. The verified outbreak dates, found in literature, are highlighted in orange and provide information on the province name and the reference used for each outbreak. These outbreak dates are used to compare and validate the anomaly detection algorithms presented in this paper.\u003c/p\u003e","description":"","filename":"figure1.jpg","url":"https://assets-eu.researchsquare.com/files/rs-3432453/v1/7920fffa706967db00db9837.jpg"},{"id":44811911,"identity":"19f7c73f-cf38-4da5-9653-ac8d3445d836","added_by":"auto","created_at":"2023-10-17 22:08:19","extension":"jpg","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":416603,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eVisual results from testing algorithms with the Tak Province.\u003c/strong\u003e Anomaly detection algorithms tested with Tak provincial malaria data from 2012 to 2022. a) the statistical profiling method shows 3 standard deviation bands. Observations falling outside the 3 standard deviation bands are classified as anomalous. b) the predictive confidence interval method is used to create 3 standard deviation bands from the mean standard error. Observations falling outside the 3 standard deviation band are classified as anomalous. c) the unsupervised method using DBSCAN is used to cluster observations. Observations in cluster 0 (smallest cluster) are defined as anomalous while observations in cluster 1 are not. d) the weekly cumulative case comparison method is used to compare observations. Weeks where cumulative cases are higher than the previous year’s weekly cases (blue) are classified as anomalous.\u003c/p\u003e","description":"","filename":"figure2.jpg","url":"https://assets-eu.researchsquare.com/files/rs-3432453/v1/5b1766265be0a38149e0f052.jpg"},{"id":44811912,"identity":"ba683f4f-7d53-4ab7-934b-ce8c513ee597","added_by":"auto","created_at":"2023-10-17 22:08:19","extension":"jpg","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":255304,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFinal user interface\u003c/strong\u003e. Output from the “Analytics” tab showing maps, anomalous province names, and case trends in the application \u003ca href=\"https://moru.shinyapps.io/Malaria_Anomaly_Detection_App/\"\u003ehttps://moru.shinyapps.io/Malaria_Anomaly_Detection_App/\u003c/a\u003e. The user selects the species, method, and time period of interest to run the analysis. The methods are grouped by machine-learning-based (orange) and threshold or statistical-based (blue). After the investigation is complete, the anomaly map, the standardised incidence ratio map, and the anomalous provincial names are shown. Additional map descriptions are shown in the map descriptions tab.\u003c/p\u003e","description":"","filename":"figure3.jpg","url":"https://assets-eu.researchsquare.com/files/rs-3432453/v1/b80c7621fd0abe843f583d4e.jpg"},{"id":44813022,"identity":"ad5aa875-01f1-40b7-8859-9d82780a6948","added_by":"auto","created_at":"2023-10-17 22:16:20","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1064359,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-3432453/v1/6498014b-2a2a-46e5-a06c-f5708882ad90.pdf"}],"financialInterests":"","formattedTitle":"\u003cp\u003e\u003cstrong\u003eEarly Warning Systems For Malaria Outbreaks in Thailand: An Anomaly Detection Approach\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"Background","content":"\u003cp\u003eMalaria remains a life-threatening and preventable disease in many parts of the world[\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e]. While significant progress in reducing Thai malaria cases has occurred in the past two decades, continued efforts are necessary to achieve elimination[\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e, \u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e]. The Operational Plan 2017\u0026ndash;2021, aligned with Thailand\u0026rsquo;s National Malaria Elimination Strategy 2017\u0026ndash;2026, emphasises the need to enhance rapid identification of infections and implement timely and active surveillance and response measures to prevent further transmission [\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e]. The Division of Vector-Borne Disease (DVBD) leads the national malaria program and is responsible for implementing surveillance initiatives in Thailand [\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e]. The DVBD, operating under the Department of Disease Control of the Ministry of Public Health, facilitated and oversees real-time aggregation of electronic malaria case data [\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e, \u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e]. The electronic malaria information system (eMIS) was developed by the Center of Excellence for Biomedical and Public Health Informatics (BIOPHICS), Faculty of Tropical Medicine at Mahidol University aiming to replace paper-based malaria reporting with near-real-time electronic reporting [\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e]. BIOPHICS currently hosts all eMIS data, acting as the ongoing technical system support for the ministry [\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eWith the development of eMIS, Thailand has conducted the 1-3-7 strategy to improve malaria elimination [\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e]. This strategy involves notifying each malaria case within 1 day of testing positive for malaria, classifying the case within 3 days, and completing a response within 7 days [\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e]. Responses include blood sampling, distributing insecticide-treated bed nets, indoor residual spraying, and health education and depend on case classification [\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e]. Seasonal malaria chemoprevention (SMC) has been used as preventative treatment in areas with seasonal transmission and require adaptable thresholds to define disease patterns over time and space. These thresholds are used as a surveillance method to identify suitable areas for SMC and require input from health districts as they are often challenging to define [\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e]. Overall, these methods require a broad workforce, high data quality, continued leadership, and are costly. To successfully eliminate malaria in Thailand, it is crucial to incorporate well supported community-based health workers and establish an affordable and efficient detection system. This system should quickly identify outbreaks in their early stages, be adaptable to various health districts\u0026rsquo; needs, and reduce the malaria burden more rapidly in the remaining localised high transmission foci [\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eEarly warning systems give advance warnings of impending epidemics and play a crucial role in the malaria surveillance program overseen by the Division of Vector Borne Disease (DVBD) [\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e, \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e10\u003c/span\u003e]. Malaria outbreaks are defined as higher than usual malaria case activity in a specific area. Currently, the warning system relies on a three-year median approach, where an alert is triggered if weekly malaria cases exceed the three-year median of weekly cases from previous years and prompt investigation by the DVBD [\u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e11\u003c/span\u003e]. The publicly available online dashboard for the Thailand Malaria Elimination Program (\u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://malaria.ddc.moph.go.th/malariaR10/index_newversion.php\u003c/span\u003e\u003cspan address=\"https://malaria.ddc.moph.go.th/malariaR10/index_newversion.php\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e), provides information on provincial case counts, weekly case counts, three-year median thresholds, and the implementation of the 1-3-7 strategy throughout Thailand. This tool provides general case visualisation across Thailand, but it does not support identification of unusual malaria case activity across Thailand [\u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e11\u003c/span\u003e]. The development of improved early warning mechanisms and a robust dashboard is needed to optimise the response time and allocation of resources to areas with impending epidemics and to support effective implementation of preventive measures.\u003c/p\u003e \u003cp\u003eAnomaly detection is used to discover unexpected or rate events in data streams and can be applied to health data to identify outliers in a system [\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e]. Anomaly detection algorithms are dynamic and can include a combination of statistical and machine learning approaches and threshold-based methods that detect highly abnormal activities in the data. Examples of uses are fraud detection in insurance and banking, intrusion detection of computer networks, and medical informatics for disorder detection [\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e]. Three types of machine learning-based anomaly detection algorithms are supervised, unsupervised, and semi-supervised [\u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e13\u003c/span\u003e]. While no single anomaly detection method is universally effective, several approaches are suited for time series anomaly detection. These approaches include predictive confidence levels, statistical profiling, clustering, and density-based profiling [\u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e13\u003c/span\u003e, \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e]. Anomaly detection algorithms are a promising technique for early identification of abnormal malaria activity, but no existing research has applied statistical and machine learning-based anomaly detection algorithms to malaria case data. Existing early warning systems could be improved by designing anomaly detection algorithms for Thai malaria case data.\u003c/p\u003e \u003cdiv id=\"Sec2\" class=\"Section2\"\u003e \u003ch2\u003eAims and Objectives\u003c/h2\u003e \u003cp\u003eThe aim of this research is to propose an early detection system to support the malaria elimination program in Thailand and to improve methods for early detection of malaria in areas with impending outbreaks. To achieve this aim, the main research objectives are:\u003c/p\u003e \u003cp\u003e \u003col\u003e \u003cspan\u003e \u003cli\u003e \u003cp\u003eDevelop anomaly detection algorithms and early detection thresholds that are suitable for malaria data in Thailand.\u003c/p\u003e \u003c/li\u003e \u003c/span\u003e \u003cspan\u003e \u003cli\u003e \u003cp\u003eCompare the developed algorithms to Thailand\u0026rsquo;s current early warning threshold.\u003c/p\u003e \u003c/li\u003e \u003c/span\u003e \u003cspan\u003e \u003cli\u003e \u003cp\u003eDevelop a prototype user interface for Thai public health professionals that supports early identification of outbreaks and enables focused attention on anomalous areas.\u003c/p\u003e \u003c/li\u003e \u003c/span\u003e \u003c/ol\u003e \u003c/p\u003e \u003c/div\u003e"},{"header":"Methods","content":"\u003cp\u003eTo support the objectives of this study, the methods are separated into five main sections: data, algorithms, algorithm comparison, code structure, and user interface.\u003c/p\u003e\n\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e\n\u003ch2\u003eData\u003c/h2\u003e\n\u003cp\u003eThe data for this analysis was provided by the Ministry of Public Health and used under a research protocol approved by the Ethics Committee of the Faculty of Tropical Medicine, Mahidol University, Bangkok. The data contains Thailand malaria cases reported from 2012 to 2022 with personal identifiers excluded from the analyses. The data contains 31 variables including the blood draw date, nationality, sex, age, province, province ID, subdistrict, species of malaria, border type, occupation, and treatment for 180256 observations of malaria cases. All province names are translated into English based on their provincial ID (details in Additional file 1). The data is transformed into incidence data based on the case counts per date and then grouped based on province for further analysis. Initial visualisation of the data is shown (see Fig.\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e and Additional file 2) and can be further visualised in the analytics tab of the final dashboard: \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://moru.shinyapps.io/Malaria\u003c/span\u003e\u003c/span\u003e Anomaly Detection App/.\u003c/p\u003e\n\u003cp\u003eMonthly precipitation and temperature data from the Climate Change Knowledge Portal is incorporated into some machine learning methods [\u003cspan class=\"CitationRef\"\u003e15\u003c/span\u003e]. The dataset contains monthly precipitation and temperature from 2012 to 2021 and is added to the corresponding malaria case data from BIOPHICS. The data was interpolated to produce daily values (details in Additional file 2) and scaled to be comparable to the malaria case data. The scaled case, temperature, and precipitation data are used in the unsupervised clustering methods.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec5\" class=\"Section2\"\u003e\n\u003ch2\u003eAnomaly Detection Algorithms\u003c/h2\u003e\n\u003cp\u003eTwo main types of anomaly detection algorithms developed are statistical and machine learning-based methods, and threshold-based methods. Each method will be used to identify anomalous or unusual malaria activity. The performance for each type of anomaly detection algorithm is compared in the following section. Table\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e shows the methods used for this analysis.\u003c/p\u003e\n\u003cdiv class=\"gridtable\"\u003e\n\u003ctable id=\"Tab1\" border=\"1\"\u003e\u003ccaption\u003e\n\u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e\n\u003cdiv class=\"CaptionContent\"\u003e\n\u003cp\u003eMethods used for anomaly detection and their references\u003c/p\u003e\n\u003c/div\u003e\n\u003c/caption\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eMethod\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eReferences\u003c/p\u003e\n\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eStatistical Profiling\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e14\u003c/span\u003e, \u003cspan class=\"CitationRef\"\u003e24\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003ePredictive Confidence Interval\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e14\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eUnsupervised Clustering\u003csup\u003e1\u003c/sup\u003e\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e23\u003c/span\u003e, \u003cspan class=\"CitationRef\"\u003e25\u003c/span\u003e\u0026ndash;\u003cspan class=\"CitationRef\"\u003e28\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eWeekly Case Comparison\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e4\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eMonthly Case Comparison\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e29\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eRolling Historical Average\u003csup\u003e2\u003c/sup\u003e\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eWeekly Three-Year Median\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e11\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctfoot\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"2\"\u003e\u003csup\u003e1\u003c/sup\u003e Two main unsupervised clustering techniques are used for this method: time-series clustering with tsclust [\u003cspan class=\"CitationRef\"\u003e23\u003c/span\u003e] and density based clustering using DBSCAN. \u003csup\u003e2\u003c/sup\u003e This method was developed based on a combination of techniques from statistical profiling and weekly case comparison.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tfoot\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003eAnomaly detection algorithms based on statistical or machine learning approaches include statistical profiling, predictive confidence interval, unsupervised time-series clustering, unsupervised density-base clustering with the malaria case data, and unsupervised density-based clustering with the malaria case data in combination with precipitation and temperature data (see additional file 11 for detailed descriptions).\u003c/p\u003e\n\u003cp\u003eThreshold-based anomaly detection algorithms define a threshold based on previous malaria case counts, including weekly and monthly malaria case comparisons, rolling historical averages, and weekly three-year median case comparisons (see additional file 11 for detailed descriptions).\u003c/p\u003e\n\u003cp\u003eAs an initial test, early detection methods are applied and visualised at a provincial level to see if unusual case activity can be identified using this dataset. All methods can be selected in the dropdown menu in the analytics tab of the final dashboard (\u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://moru.shinyapps.io/Malaria\u003c/span\u003e\u003c/span\u003e Anomaly Detection App/) and are grouped by machine-learning-based (orange) or threshold and statistical-based (blue) (see Fig.\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e).\u003c/p\u003e\n\u003cdiv id=\"Sec6\" class=\"Section3\"\u003e\n\u003ch2\u003eAlgorithm Validation and Comparison\u003c/h2\u003e\n\u003cp\u003eTo validate the algorithms, additional literature review, the online Thailand Malaria Elimination Program tool, and consultation with BIOPHICS provided information on dates and provinces where malaria outbreaks were previously reported. To match available malaria data, outbreaks reported from 2012 to 2022 were selected. The two main goals for the validation stage is to identify the number of outbreaks caught for each method up to two weeks prior to the verified outbreak date, and the number of alerts triggered by each method.\u003c/p\u003e\n\u003cp\u003eFrom literature, the Thailand Malaria Elimination Program online tool, and consultation with BIOPHICS, 7 outbreak dates were identified. 6 of the 7 outbreaks were reported at a provincial level while 1 (2017 Kanchanaburi) was reported at a subdistrict level. Reported outbreaks are generally clustered along provinces bordering Laos, Cambodia, and Myanmar and could have resulted from factors like migrant movement, limited access to malaria prevention and diagnostics, inadequate monitoring measures, dense forest regions, and political and social unrest [\u003cspan class=\"CitationRef\"\u003e16\u003c/span\u003e]. The summary of outbreak dates are shown in Table\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e (see additional file 12 for detailed descriptions).\u003c/p\u003e\n\u003cdiv class=\"gridtable\"\u003e\n\u003ctable id=\"Tab2\" border=\"1\"\u003e\u003ccaption\u003e\n\u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e\n\u003cdiv class=\"CaptionContent\"\u003e\n\u003cp\u003eOutbreak dates reported in literature from 2012 and 2022\u003c/p\u003e\n\u003c/div\u003e\n\u003c/caption\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eDate Reported\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eProvince\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eRefence\u003c/p\u003e\n\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2014\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eUbon Ratchathani\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e30\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2015\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eUbon Ratchathani\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e30\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2016\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eYala\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e31\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2017\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eSi Sa Ket\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e29\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2017\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eKanchanaburi\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e31\u003c/span\u003e]\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2022\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eKanchanaburi\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e31\u003c/span\u003e]\u003csup\u003e1\u003c/sup\u003e\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e2022\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eTak\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e[\u003cspan class=\"CitationRef\"\u003e32\u003c/span\u003e]\u003csup\u003e1\u003c/sup\u003e\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctfoot\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"3\"\u003e\u003csup\u003e1\u003c/sup\u003e Additional analysis of case data shows large spike and from consultation with BIOPHICS.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tfoot\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003eAll anomaly detection methods are run through all the provinces. Each province and method was assessed to determine if it could generate warnings within a two-week window leading up to the outbreak date. The exact outbreak date, shown as a peak in cases, is found using the Thailand Malaria Elimination Program online tool and compared to estimates reported in literature. The function summed the total real outbreak dates each method caught and the total number of alerts each method produced. Algorithm \u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e for this function is shown below and the final results from testing is shown in the analytics tab of the final dashboard.\u003c/p\u003e\n\u003cp\u003eIn addition to reporting verified outbreaks, the total number of alerts reported from each method are also tracked. Each anomaly detection method is applied to all the malaria data from 2012 to 2022 and reports the number of anomalies or alerts each method triggers. The purpose of tracking these alerts is to ensure that the method used for anomaly detection is not highly sensitive to every irregularity found in the case data and reporting is done for only highly anomalous activity.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec7\" class=\"Section2\"\u003e\n\u003ch2\u003eCode Structure\u003c/h2\u003e\n\u003cp\u003eThe code is structured to conduct anomaly analysis at a provincial level, with a user-defined method, time frame, and malaria species (see Additional file 10). The data is converted into incidence data based on the resolution of analysis and grouped at a provincial level. The resolution of analysis can be increased to smaller regions; however, this will be more computationally intensive. After the user-specified method is applied to each province, the daily anomalous activity is reported for the time frame defined and stored in an outer data frame. The final activity data frame is used for further analysis and is connected to visualisations in the user interface in the form of a map highlighting anomalous provinces.\u003c/p\u003e\n\u003cdiv id=\"Sec8\" class=\"Section3\"\u003e\n\u003ch2\u003eInterface\u003c/h2\u003e\n\u003cp\u003eThe user interface is designed for the DVBD surveillance team with consultation through BIOPHICS. For easy visualization and prototyping, a wireframe of the inter-face was developed using Canva [\u003cspan class=\"CitationRef\"\u003e17\u003c/span\u003e]. An R Shiny application was developed to test and debug functions, integrating visualization tools like raster, rworldmap, and ggplot to highlight anomalous activities [\u003cspan class=\"CitationRef\"\u003e18\u003c/span\u003e\u0026ndash;\u003cspan class=\"CitationRef\"\u003e21\u003c/span\u003e].\u003c/p\u003e\n\u003cp\u003eThe final application was created using R Shiny and bs4Dash and has three main pages [\u003cspan class=\"CitationRef\"\u003e22\u003c/span\u003e]. The first page describes the project and the algorithms available for analysis. The second page provides a weekly summary, including information on provinces with detected anomalies. The third page allows the user to conduct further analysis by inputting the time frame, method, and species of malaria used for analysis. Two main visualisations are updated every time a new analysis is initiated: one highlighting provinces with anomalies detected and another showing the standardised incidence ratio of malaria incidence across Thailand. Additional information such as trend lines, percentage of provinces with anomalies detected, and names of provinces with unusual activity are also included.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e"},{"header":"Results","content":"\u003cdiv id=\"Sec10\" class=\"Section2\"\u003e\n\u003ch2\u003eAlgorithm Development and Validation\u003c/h2\u003e\n\u003cp\u003eA total of 9 anomaly detection algorithms were created and initially tested and visualised to confirm correctly implemented alerts were produced for observations exceeding thresholds or bands defining anomalous activity for the Tak province (see Fig.\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e and Additional file 3). From this initial test, anomalous observations are distinguished from normal malaria case activity.\u003c/p\u003e\n\u003cp\u003eAfter the anomaly detection algorithms were developed and validated with the Tak province, their performances were compared and their results are shown in Table\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e. As described in section 2.3, the highest number of verified anomalies found was 6 out of the 7. Methods able to identify 6 outbreaks were historical average, weekly case counts, and the weekly three-year median method. Of these three methods, the historical average method had the lowest number of alerts produced (see Additional file 4 for visualisations of true anomalies caught using the historical average and DBSCAN method applied to Ubon Ratchathani). Of the 9 methods, 4 methods were unable to identify the labelled outbreaks. These methods are density-based profiling with DBSCAN, density-based profiling with DBSCAN including temperature and precipitation data, unsupervised clustering with tsclust [\u003cspan class=\"CitationRef\"\u003e23\u003c/span\u003e], and monthly case comparison. The method reporting the most alerts is the weekly three-year median while the method reporting the lowest number of alerts is density-based profiling with DBSCAN.\u003c/p\u003e\n\u003cdiv class=\"gridtable\"\u003e\n\u003ctable id=\"Tab3\" border=\"1\"\u003e\u003ccaption\u003e\n\u003cdiv class=\"CaptionNumber\"\u003eTable 3\u003c/div\u003e\n\u003cdiv class=\"CaptionContent\"\u003e\n\u003cp\u003eResults from Method Comparison\u003c/p\u003e\n\u003c/div\u003e\n\u003c/caption\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eMethod\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eUbon(2014)\u003csup\u003e3\u003c/sup\u003e\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eUbon(2015)\u003csup\u003e3\u003c/sup\u003e\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eYala(2016)\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eSSK(2017)\u003csup\u003e3\u003c/sup\u003e\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eKCN(2017)\u003csup\u003e3\u003c/sup\u003e\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eKCN(2022)\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eTak(2022)\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eVerified Anomalies Detected(%)\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"left\"\u003e\n\u003cp\u003eTotal Reported\u003csup\u003e4\u003c/sup\u003e\u003c/p\u003e\n\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eStatistical Profiling\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e1 (14%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e882\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003ePredictive Confidence Interval\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e3 (43%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e2356\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eUnsupervised Clustering\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e0 (0%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e75\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eDensity-Based Profiling\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e0 (0%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e5\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eDensity-Based Profiling w/T\u0026amp;P\u003csup\u003e1\u003c/sup\u003e\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e0 (0%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e452\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eHistorical Average\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e6 (86%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e10875\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eWeekly Case Previous Year\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e6 (86%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e30449\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eMonthly Case Four Years\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e0 (0%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e5577\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003eWeekly Three-Year Median\u003csup\u003e2\u003c/sup\u003e\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026times;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e\u0026radic;\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"left\"\u003e\n\u003cp\u003e6 (86%)\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd align=\"char\" char=\".\"\u003e\n\u003cp\u003e32630\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctfoot\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"10\"\u003e\u003csup\u003e1\u003c/sup\u003e Temperature and precipitation included in analysis\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"10\"\u003e\u003csup\u003e2\u003c/sup\u003e Baseline method used in Thailand (BIOPHICS)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"10\"\u003e\u003csup\u003e3\u003c/sup\u003e Ubon: Ubon Ratchathani, SSK: SI Sa Ket, KCN: Kanchanaburi\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"10\"\u003e\u003csup\u003e4\u003c/sup\u003e Total anomalies repored for each method when applied to all malaria cases between 2012 and 2022.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tfoot\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec11\" class=\"Section2\"\u003e\n\u003ch2\u003eCode Structure and Functionalisation\u003c/h2\u003e\n\u003cp\u003eAfter the algorithms\u0026rsquo; performance were tested, they were converted into functions with easily adaptable outbreak definitions. Data handling and filtering functions are created to allow user input into the analysis. Additional functions were created to run anomaly detection algorithms across all provinces based on user-defined inputs such as malaria species and time period for analysis, and to store the anomaly status of each province for map visualisation. The code structure (see Fig.\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e) was achieved. All the code files can also be found here: \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://github.com/mghDissertation/malaria\u003c/span\u003e\u003c/span\u003e anomaly detect.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec12\" class=\"Section2\"\u003e\n\u003ch2\u003eUser Interface\u003c/h2\u003e\n\u003cp\u003eTo aid in crafting the optimal design and layout for the final dashboard, a wireframe was developed (refer to Additional file 5), specifically tailored for anomaly detection. An intermediate application (refer to Additional file 5) was utilized to validate code functionality, offering a visual depiction of provinces marked for atypical malaria activity. The dashboard\u0026rsquo;s design was refined based on feedback from BIOPHICS and fellow researchers, ensuring effective anomaly detection and granting users the flexibility to choose essential parameters. The final dashboard contains three main pages with information on methods, generated visuals, and method-specific accuracy. The aim is to allow users to easily compare different methods, species, and time frames used for analysis. The final dashboard, as shown in Fig.\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e and Additional file 5, will feature the best method on its summary page for DVBD\u0026rsquo;s use. The final application is hosted here: \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://moru.shinyapps.io/Malaria\u003c/span\u003e\u003c/span\u003e Anomaly Detection App/.\u003c/p\u003e\n\u003c/div\u003e"},{"header":"Discussion","content":"\u003cp\u003eThe creation of effective anomaly detection algorithms combined with a user inter-face tailored for anomaly detection supports progress towards the Thailand Malaria Elimination Program.\u003c/p\u003e \u003cdiv id=\"Sec14\" class=\"Section2\"\u003e \u003ch2\u003eAlgorithms\u003c/h2\u003e \u003cp\u003eBased on the algorithm evaluation, three methods historical average, weekly case comparison, and weekly three-year median identified 86% of the labeled outbreaks. As observed in Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e, each of these three methods detected either 6 or 7 outbreaks. The historical average method was able to detect all verified outbreak dates except for the 2014 Ubon Rachathani outbreak. Given that the dataset begins in 2012 and the historical average method requires data from the previous three years, the alert threshold value might have been set higher than intended, preventing the alert from being triggered. In contrast, the weekly case comparison method identified all verified outbreaks except for the 2015 Ubon Ratchathani observation. The weekly case comparison method relies on the weekly cumulative counts from the previous year and because an outbreak was reported in Ubon Ratchathani from the previous year, a slight decrease in case values would not have been able to trigger an alert for this method even if an outbreak was declared. Similarly, the three-year median method identified all outbreaks except for the one in Kanchanaburi in 2017. Since this outbreak was reported at a subdistrict level, it was more difficult to catch these irregularities when the analysis was completed at a provincial level. Other methods that failed to detect this subdistrict outbreak include statistical profiling, predictive confidence interval, unsupervised clustering with tsclust package [\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e], density-based profiling using only case data, density-based profiling combining case data with temperature and precipitation data, and monthly case comparison. Although the currently implemented three-year median method identified 6 out of 7 actual outbreaks, it generated approximately three times as many predictions (or total reported alerts) compared to the historical average method. The primary objective of these algorithms is to guide the DVBD on which areas to prioritize, especially in resource-limited scenarios, to preemptively control potential outbreaks. In practice, a low false positive rate combined with a high true positive rate is crucial for DVBD to effectively respond to outbreaks.\u003c/p\u003e \u003cp\u003eThe statistical profiling method detected 14.2% of the labeled outbreaks, while the predictive confidence interval method detected 43%. Despite having fewer alerts, these methods outperformed others in accuracy. For instance, the statistical profiling method identified anomalies solely for the 2016 Yala outbreak. In contrast, the predictive confidence interval method detected the 2016 Yala outbreak and also the 2017 Si Sa Ket and 2014 Ubon Ratchathani outbreaks. By collaborating further with the DVBD, we can determine acceptable false positive rates and sensitivity levels. This will help in refining the customization of warning methods for specific health districts. Regarding machine-learning-based methods, techniques such as unsupervised clustering with tsclust [\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e] and DBSCAN with malaria case data did not identify any labeled outbreak data. This was also the case when combining malaria case data with precipitation and temperature metrics. While these methods were tested at a provincial level, their outcomes might vary when implemented at district or village levels.\u003c/p\u003e \u003cp\u003eCompared to threshold-based methods, statistical and machine-learning-based anomaly detection methods showed lower accuracy in identifying verified outbreaks when tested with malaria data from 2012 to 2022. From Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e, we see that different methods were able to capture different anomalous activities. A combination of these methods can be used to capture different types of anomalies across Thailand and should be tested with more verified outbreak dates. In this context, the historical average method outperformed others due to its high accuracy in identifying outbreaks and its low false positive rate. Observations deemed anomalous are categorized based on threshold definitions. These thresholds can be adjusted to match the tolerance levels set by health districts, akin to the criteria used for SMC area identification. Depending on the application and scenario, tailored algorithm thresholds can be designed based on health district needs. Easy integration is possible as all methods and code are functionalized and adaptable to requirements set by different health districts.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec15\" class=\"Section2\"\u003e \u003ch2\u003eUser Interface\u003c/h2\u003e \u003cp\u003eThe final dashboard, tailored specifically for anomaly detection, has been designed to be user-friendly, allowing disease surveillance professionals to easily navigate and interact with the detection algorithms. It offers tools for visualizing anomalies and user-defined analysis parameters, and it facilitates in-depth analysis of atypical patterns in malaria data.\u003c/p\u003e \u003cp\u003eThe dashboard application has three main pages. The \u0026rsquo;Introduction\u0026rsquo; page presents the application\u0026rsquo;s objectives and methodologies. The \u0026rsquo;Summary\u0026rsquo; page provides weekly insights on anomalous provinces and malaria cases, categorized by border types, based on a default method determined by the health district.\u003c/p\u003e \u003cp\u003eThe analysis page allows users to expand their analysis through user-defined methods, malaria species, and time frames. Its core aim is to showcase how different methods and time frames affect provincial alerts. Method options are grouped into machine-learning and statistical (orange) or threshold-based (blue) in a dropdown \u003cspan refid=\"Sec3\" class=\"InternalRef\"\u003emethods\u003c/span\u003e section in the analysis page of the dashboard.\u003c/p\u003e \u003cp\u003eThe analysis page provides step-by-step guidance, highlighting anomalous provinces on a map and showing standardised malaria incidence across Thailand. After each analysis, anomalous provinces are listed, and an interactive widget displays malaria cases over time per province.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec16\" class=\"Section2\"\u003e \u003ch2\u003eLimitations\u003c/h2\u003e \u003cp\u003eCertain limitations were present in this study. For specific statistical methods, we relied on literature to classify anomalies as values surpassing 3 standard deviations above the mean. As each province follows its own protocol for defining malaria out-breaks and resource allocation, collaborating with different health districts to establish outbreak thresholds is essential to identify the most suitable method for them. This cooperative approach, combined with user feedback for both the algorithms and user interface, can help identify the most suitable anomaly detection method for each province. For the dataset used, observations started in 2012 and ended in May 2022, and lacks real-time integration with the malaria reporting database. Although functions are compatible with raw data, real-time integration should be conducted. Though our analysis focused developing a proof-of-concept on a provincial level for efficiency, it could be extended to subdistrict or sub village scales to represent the surveillance resolution implemented in the 1-3-7 program. More outbreak data points and working directly with the DVBD surveillance team would improve validation, algorithm sensitivity, and the final interface.\u003c/p\u003e \u003c/div\u003e"},{"header":"Conclusions","content":"\u003cp\u003eWe propose an enhanced early warning system to bolster malaria elimination efforts in Thailand. Statistical, machine learning, and threshold-based methods were developed and compared. Compared to the current method analyzing malaria case data from 2012 to 2022, the historical average-based method demonstrated equivalent sensitivity with a reduced false positive rate. We developed a user interface tailored for anomaly detection, which aids in early detection by summarizing anomalies on a weekly basis across provinces. The code has been optimized for functionality and is configured to synchronize with the real-time malaria database. The anomaly detection algorithms could be integrated at the case identification stage of the 1-3-7 protocol and applied at a sub village level. This approach would assist in determining the allocation of resources to prevent the spread of atypical malaria cases. The proposed early warning system enhances the timely identification of provinces at risk of epidemics and seamlessly integrates with Thailand\u0026rsquo;s malaria surveillance system.\u003c/p\u003e"},{"header":"Abbreviations","content":"\u003cp\u003eDVBD: Division of Vector Borne Disease\u003c/p\u003e\n\u003cp\u003eeMIS: Electronic Malaria Information System\u003c/p\u003e\n\u003cp\u003eBIOPHICS: Center of Excellence for Biomedical and Public Health Informatics\u003c/p\u003e\n\u003cp\u003eDBSCAN: Density-Based Spatial Clustering of Applications with Noise\u003c/p\u003e\n\u003cp\u003eWHO: World Health Organization\u003c/p\u003e\n\u003cp\u003eSMC: Seasonal Malaria Chemoprevention\u003c/p\u003e\n\u003cp\u003eARIMA: Autoregressive Integrated Moving Average\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003eCompeting interests: The authors declare no competing interests.\u003c/p\u003e\u003cp\u003e\u003cem\u003eEthics approval and consent to participate\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eThis study was based on aggregate \u003cem\u003eP. vivax\u003c/em\u003e surveillance data in Thailand, provided by the Ministry of Health. No confidential information was included because mathematical analyses were performed at the aggregate level. All methods were performed under a research protocol approved by the Ethics Committee of the Faculty of Tropical Medicine, Mahidol University, Bangkok (reference TMEC 22-056).\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eCode availability\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eThe code is available on Github at (https://github.com/mghDissertation/malaria anomaly detect).\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eAvailability of data and materials\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eThe Thai malaria data is not publishable, however, a summary of the data is found in Additional file 2. Additional file 6 outlines the outbreak dates used for the method comparison section. The precipitation and temperature data can be found on the Climate Knowledge Portal (https://climateknowledgeportal.worldbank.org/) and is visualised in Additional file 2. Additional file 7 and 8 shows the precipitation and temperature data used for this report. The provincial population data is available through the National Statistical Office (http://statbbi.nso.go.th/staticreport/page/ sector/en/01.aspx)(details in Additional file 9).\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eFunding\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eThis research was funded in part by the Wellcome Trust (Grant number 220211). For the purposes of open access, the authors have applied a CC BY public copyright license to any Author Accepted Manuscript version arising from this submission.\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eAuthors\u0026rsquo; contributions\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eConceptualisation: OS, WPN, SS\u003c/p\u003e\n\u003cp\u003eFormal Analysis: OS\u003c/p\u003e\n\u003cp\u003eSoftware: OS\u003c/p\u003e\n\u003cp\u003eVisualisation: OS\u003c/p\u003e\n\u003cp\u003eData Curation: OS, WPN, AK\u003c/p\u003e\n\u003cp\u003eMethodology: OS, SS\u003c/p\u003e\n\u003cp\u003eValidation: OS, WPN, AK\u003c/p\u003e\n\u003cp\u003eWriting and Editing: OS, WPN, SS\u003c/p\u003e\n\u003cp\u003eAll authors reviewed the manuscript.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003e\u003cstrong\u003eFact sheet about malaria \u003c/strong\u003e[https://www.who.int/news-room/fact-sheets/detail/malaria]\u003c/li\u003e\n\u003cli\u003eChareonviriyaphap T, Bangs MJ, Ratanatham S: \u003cstrong\u003eStatus of malaria in Thailand.\u003c/strong\u003e \u003cem\u003eSoutheast Asian J Trop Med Public Health \u003c/em\u003e2000, \u003cstrong\u003e31:\u003c/strong\u003e225-237.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eThailand gears up to eliminate malaria by 2024 \u003c/strong\u003e[https://www.who.int/news-room/feature-stories/detail/thailand-gears-up-to-eliminate-malaria-by-2024]\u003c/li\u003e\n\u003cli\u003eLertpiriyasuwat C, Sudathip P, Kitchakarn S, Areechokchai D, Naowarat S, Shah JA, Sintasath D, Pinyajeerapat N, Young F, Thimasarn K, et al: \u003cstrong\u003eImplementation and success factors from Thailand\u0026apos;s 1-3-7 surveillance strategy for malaria elimination.\u003c/strong\u003e \u003cem\u003eMalar J \u003c/em\u003e2021, \u003cstrong\u003e20:\u003c/strong\u003e201.\u003c/li\u003e\n\u003cli\u003eMa S, Lawpoolsri S, Soonthornworasiri N, Khamsiriwatchara A, Jandee K, Taweeseneepitch K, Pawarana R, Jaiklaew S, Kijsanayotin B, Kaewkungwal J: \u003cstrong\u003eEffectiveness of Implementation of Electronic Malaria Information System as the National Malaria Surveillance System in Thailand.\u003c/strong\u003e \u003cem\u003eJMIR Public Health Surveill \u003c/em\u003e2016, \u003cstrong\u003e2:\u003c/strong\u003ee20.\u003c/li\u003e\n\u003cli\u003eShah JA: \u003cstrong\u003eLearnings from Thailand in building strong surveillance for malaria elimination.\u003c/strong\u003e \u003cem\u003eNat Commun \u003c/em\u003e2022, \u003cstrong\u003e13:\u003c/strong\u003e2677.\u003c/li\u003e\n\u003cli\u003eJongdeepaisal M, Khonputsa P, Prasert O, Maneenet S, Pongsoipetch K, Jatapai A, Rotejanaprasert C, Sudathip P, Maude RJ, Pell C: \u003cstrong\u003eForest malaria and prospects for anti-malarial chemoprophylaxis among forest goers: findings from a qualitative study in Thailand.\u003c/strong\u003e \u003cem\u003eMalar J \u003c/em\u003e2022, \u003cstrong\u003e21:\u003c/strong\u003e47.\u003c/li\u003e\n\u003cli\u003eSmithuis FM, White NJ: \u003cstrong\u003eSpend wisely to eliminate malaria.\u003c/strong\u003e \u003cem\u003eLancet Infect Dis \u003c/em\u003e2022, \u003cstrong\u003e22:\u003c/strong\u003ee171-e175.\u003c/li\u003e\n\u003cli\u003eKonchom S, Singhasivanon P, Kaewkungwal J, Chuprapawan S, Thimasarn K, Kidson C, Yimsamran S, Rojanawatsirivet C: \u003cstrong\u003eEarly detection of malaria in an endemic area: model development.\u003c/strong\u003e \u003cem\u003eSoutheast Asian J Trop Med Public Health \u003c/em\u003e2006, \u003cstrong\u003e37:\u003c/strong\u003e1067-1071.\u003c/li\u003e\n\u003cli\u003eMaharaj R: \u003cstrong\u003eEarly warning systems for the detection of malaria outbreaks.\u003c/strong\u003e \u003cem\u003eIndian J Med Res \u003c/em\u003e2017, \u003cstrong\u003e146:\u003c/strong\u003e560-562.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eThailand Malaria Elimination Program \u003c/strong\u003e[https://malaria.ddc.moph.go.th/malariar10/index_newversion.php]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eAnomaly Detection: Definition, Best Practices and Use Cases \u003c/strong\u003e[https://www.datrics.ai/anomaly-detection-definition-best-practices-and-use-cases]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ewhat is anomaly detection \u003c/strong\u003e[https://developer.ibm.com/learningpaths/get-started-anomaly-detection-api/what-is-anomaly-detection/]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eEffective Approaches for Time Series Anomaly Detection \u003c/strong\u003e[https://towardsdatascience.com/effective-approaches-for-time-series-anomaly-detection-9485b40077f1]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eClimate Change Knowledge Portal \u003c/strong\u003e[https://climateknowledgeportal.worldbank.org/]\u003c/li\u003e\n\u003cli\u003eAmmatawiyanon L, Tongkumchum P, Lim A, McNeil D: \u003cstrong\u003eModelling malaria in southernmost provinces of Thailand: a two-step process for analysis of highly right-skewed data with a large proportion of zeros.\u003c/strong\u003e \u003cem\u003eMalar J \u003c/em\u003e2022, \u003cstrong\u003e21:\u003c/strong\u003e334.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eCanva \u003c/strong\u003e[https://www.canva.com/]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eshiny: Web Application Framework for R \u003c/strong\u003e[https://shiny.posit.co/]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eraster: Geographic Data Analysis and Modeling \u003c/strong\u003e[https://cran.r-project.org/web/packages/raster/index.html]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003erworldmap: R package for mapping global data \u003c/strong\u003e[https://github.com/AndySouth/rworldmap/]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics \u003c/strong\u003e[https://cran.r-project.org/web/packages/ggplot2/index.html]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ebs4Dash: A \u0026apos;Bootstrap 4\u0026apos; Version of \u0026apos;shinydashboard\u0026apos; \u003c/strong\u003e[https://rinterface.github.io/bs4Dash/index.html]\u003c/li\u003e\n\u003cli\u003eMontero P, Vilar JA: \u003cstrong\u003eTSclust: An R Package for Time Series Clustering.\u003c/strong\u003e \u003cem\u003eJournal of Statistical Software \u003c/em\u003e2014, \u003cstrong\u003e62:\u003c/strong\u003e1 - 43.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e5 Ways to Detect Outliers/Anomalies That Every Data Scientist Should Know (Python Code) \u003c/strong\u003e[https://towardsdatascience.com/5-ways-to-detect-outliers-that-every-data-scientist-should-know-python-code-70a54335a623]\u003c/li\u003e\n\u003cli\u003eThang TM, Kim J: \u003cstrong\u003eThe Anomaly Detection by Using DBSCAN Clustering with Multiple Parameters. \u003c/strong\u003eIn \u003cem\u003e2011 International Conference on Information Science and Applications\u003c/em\u003e; \u003cem\u003e26-29 April 2011\u003c/em\u003e2011: 1-5.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eHow to do DBSCAN clustering in R? \u003c/strong\u003e[https://www.projectpro.io/recipes/do-dbscan-clustering-r]\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eDBSCAN Algorithm for Fraud Detection \u0026amp; Outlier Detection in a Data set \u003c/strong\u003e[https://medium.com/@dilip.voleti/dbscan-algorithm-for-fraud-detection-outlier-detection-in-a-data-set-60a10ad06ea8]\u003c/li\u003e\n\u003cli\u003eSahu RT, Verma MK, Ahmad I: \u003cstrong\u003eDensity-based spatial clustering of application with noise approach for regionalisation and its effect on hierarchical clustering.\u003c/strong\u003e \u003cem\u003eInternational Journal of Hydrology Science and Technology \u003c/em\u003e2023, \u003cstrong\u003e16:\u003c/strong\u003e240-269.\u003c/li\u003e\n\u003cli\u003eRoh ME, Lausatianragit K, Chaitaveep N, Jongsakul K, Sudathip P, Raseebut C, Tabprasit S, Nonkaew P, Spring M, Arsanok M, et al: \u003cstrong\u003eCivilian-military malaria outbreak response in Thailand: an example of multi-stakeholder engagement for malaria elimination.\u003c/strong\u003e \u003cem\u003eMalar J \u003c/em\u003e2021, \u003cstrong\u003e20:\u003c/strong\u003e458.\u003c/li\u003e\n\u003cli\u003eRegional Office for South-East Asia WHO: \u003cem\u003eProgrammatic review of the national malaria programme in Thailand: summary report.\u003c/em\u003e New Delhi: WHO Regional Office for South-East Asia; 2016.\u003c/li\u003e\n\u003cli\u003eBureau of Vector Borne Diseases DoDC, Ministry of Public Health: \u003cem\u003eGuide to Malaria Elimination For Thailand\u0026rsquo;s Local Administrative Organizations and the Health Network.\u003c/em\u003e Nonthaburi: Bureau of Vector Borne Diseases; 2019.\u003c/li\u003e\n\u003cli\u003eMercado CEG, Lawpoolsri S, Sudathip P, Kaewkungwal J, Khamsiriwatchara A, Pan-Ngum W, Yimsamran S, Lawawirojwong S, Ho K, Ekapirat N, et al: \u003cstrong\u003eSpatiotemporal epidemiology, environmental correlates, and demography of malaria in Tak Province, Thailand (2012-2015).\u003c/strong\u003e \u003cem\u003eMalar J \u003c/em\u003e2019, \u003cstrong\u003e18:\u003c/strong\u003e240.\u003c/li\u003e\n\u003c/ol\u003e"},{"header":"Additional Files","content":"\u003cp\u003eAdditional Files 1 to 12 are not available with this version.\u003c/p\u003e"},{"header":"Algorithm","content":"\u003cp\u003eAlgorithm is not available with this version.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAlgorithm 1 Validation and Comparison.\u003c/strong\u003e The pseudocode illustrates the steps used for validating and comparing various anomaly detection methods.\u003c/p\u003e"}],"fulltextSource":"","fullText":"","funders":[{"identity":"a50bf866-9b31-4744-9744-05c62c32ef22","identifier":"10.13039/100010269","name":"Wellcome Trust","awardNumber":"220211","order_by":0}],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Mahidol Oxford Tropical Medicine Research Unit","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Early Warning Systems, Malaria, Anomaly Detection, Machine Learning","lastPublishedDoi":"10.21203/rs.3.rs-3432453/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-3432453/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003ch2\u003eBackground\u003c/h2\u003e \u003cp\u003eMalaria continues to pose a significant health threat. Rapid identification of malaria infections and the deployment of active surveillance tools are crucial for achieving malaria elimination in Thailand. In this study, we introduce an anomaly detection system as an early warning mechanism for potential malaria outbreaks in the country.\u003c/p\u003e\u003ch2\u003eMethods\u003c/h2\u003e \u003cp\u003eWe developed and compared statistical, machine learning, and threshold-based anomaly detection algorithms to identify atypical malaria activity in Thailand. Additionally, we designed a user interface tailored for anomaly detection, enabling the Thai malaria surveillance team to utilize these algorithms and visualize regions exhibiting unusual malaria patterns.\u003c/p\u003e\u003ch2\u003eResults\u003c/h2\u003e \u003cp\u003eWe formulated nine distinct anomaly detection algorithms. Their efficacy in pinpointing verified outbreaks was assessed using malaria case data from Thailand spanning 2012 to 2022. The historical average threshold-based anomaly detection method triggered three times fewer alerts, while correctly identifying the same number of verified outbreaks. A limitation of this analysis is the small number of verified outbreaks; further consultation with the Division of Vector Borne Disease could help identify more verified outbreaks. The developed dashboard, designed specifically for anomaly detection, allows disease surveillance professionals to easily identify and visualise unusual malaria activity at a provincial level across Thailand.\u003c/p\u003e\u003ch2\u003eConclusion\u003c/h2\u003e \u003cp\u003eWe propose an enhanced early warning system to bolster malaria elimination efforts in Thailand. The developed anomaly detection algorithms, after thorough comparison, have been optimized for seamless integration with the current malaria surveillance infrastructure. An anomaly detection dashboard for Thailand is built and supports early detection of abnormal malaria activity. In summary, our proposed early warning system enhances the identification process for provinces at risk of outbreaks and offers easy integration with Thailand\u0026rsquo;s established malaria surveillance framework.\u003c/p\u003e","manuscriptTitle":"Early Warning Systems For Malaria Outbreaks in Thailand: An Anomaly Detection Approach","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2023-10-17 22:08:14","doi":"10.21203/rs.3.rs-3432453/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"d9e431e7-a82e-4df9-b5a7-d1bd2858a5cc","owner":[],"postedDate":"October 17th, 2023","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":25352538,"name":"Infectious Diseases"}],"tags":[],"updatedAt":"2023-10-17T22:08:15+00:00","versionOfRecord":[],"versionCreatedAt":"2023-10-17 22:08:14","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-3432453","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-3432453","identity":"rs-3432453","version":["v1"]},"buildId":"WrCJVZZCHTDjtuVLN7oU0","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. The paper's references may be in our DB but unresolved to ``paper_id`` (resolution happens at ingest when the cited DOI matches a row we already have). Run the cross-source citation reconcile pass to retry.

Source provenance

europepmc
last seen: 2026-05-19T01:45:01.086888+00:00
unpaywall
last seen: 2026-05-21T02:00:01.467718+00:00
License: CC-BY-4.0