Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

An Affordable phototherapy intensity meter using machine learning to improve the quality of care system for Hyperbilirubinemia in Indonesia

  • Yosi Kristian,

    Roles Conceptualization, Funding acquisition, Investigation, Methodology, Software, Visualization, Writing – original draft

    Affiliation Department of Informatics, Faculty of Science and Technology, Institut Sains dan Teknologi Terpadu Surabaya, Surabaya, Jawa Timur, Indonesia

  • Mahendra Tri Arif Sampurna ,

    Roles Conceptualization, Formal analysis, Funding acquisition, Investigation, Resources, Supervision, Writing – original draft, Writing – review & editing

    mahendra.tri@fk.unair.ac.id

    Affiliation Department of Pediatrics, Faculty of Medicine, Universitas Airlangga, Surabaya, Jawa Timur, Indonesia

  • Evan Kusuma Susanto,

    Roles Data curation, Investigation, Methodology, Software, Validation, Visualization, Writing – original draft, Writing – review & editing

    Affiliation Department of Informatics, Faculty of Science and Technology, Institut Sains dan Teknologi Terpadu Surabaya, Surabaya, Jawa Timur, Indonesia

  • Visuddho Visuddho,

    Roles Data curation, Investigation, Resources, Validation, Writing – original draft, Writing – review & editing

    Affiliation Medical Program, Faculty of Medicine, Universitas Airlangga, Surabaya, Jawa Timur, Indonesia

  • Kian Djien Liem

    Roles Formal analysis, Resources, Supervision, Writing – review & editing

    Affiliation Department of Pediatrics, Faculty of Medicine, Radboud University Medical Centre, Nijmegen, The Netherlands

Abstract

Hyperbilirubinemia is more frequently seen in low and middle-income countries like Indonesia. One of the contributing factors is a substandard dose of Phototherapy irradiance. This research aims to design a phototherapy intensity meter called PhotoInMeter using readily available low-cost components. PhotoInMeter is designed by using a microcontroller, light sensor, color sensor, and an ND (neutral-density) filter. We use machine learning to create a mathematical model that converts the emission from the color sensor and light sensor into light intensity measurements that are close to Ohmeda Biliblanket’s measurements. Our prototype collects sensor reading data and pairs them with Ohmeda Biliblanket Light Meter to create a training set for our machine learning algorithm. We create a multivariate linear regression, random forest, and XGBoost model based on our training set to convert sensor readings to Ohmeda Biliblanket Light Meter measurement. We successfully devised a prototype that costs 20 times less to produce compared to our reference intensity meter while still having high accuracy. Compared to Ohmeda Biliblanket Light Meter, our PhotoInMeter has a Mean Absolute Error (MAE) of 0.83 and achieves more than a 0.99 correlation score in all six different devices for intensity in the range of 0–90 μW/cm2/nm. Our prototypes show consistent reading between PhotoInMeter devices, having an average difference of 0.435 among all six devices.

Introduction

Hyperbilirubinemia accounts for 40–60% of cases among all hospitalized neonates in the first seven days of life with a risk of bilirubin neurotoxicity [1]. Phototherapy is one method that has been shown to reduce unconjugated bilirubin levels effectively. Currently there are many types of phototherapy equipment commercially available [2]. The clinical response to phototherapy depends on the effectiveness of the phototherapy device to reduce bilirubin levels as a result of a balance in bilirubin production and elimination. The dose of phototherapy is the light intensity given in measurable doses [3]. In fact, even though in developing countries, the variability of light intensity used for phototherapy is still too low [4].

Many studies have shown that developing countries such as India, Nigeria and Cameroon are reported to have less than optimal phototherapy light intensities below the therapeutic range [5, 6]. In Indonesia, a study of 17 hospitals found that 8 hospitals had phototherapy lamps below the therapeutic value [7]. These results indicate that suboptimal phototherapy is frequently occurring and may even be ineffective in reducing bilirubin levels. Evaluation phototherapy device intensity in level III hospital also showed variable results of wide-ranging intensity from sub-therapeutic dose to super high intensity which may unnecessary and may cause harm [8]. Thus, knowing the level of reduction in the radiation intensity of phototherapy devices is very important to prevent ineffective phototherapy so that it could reduce exchange transfusion (ET) procedure and complications of severe hyperbilirubinemia which can cause brain damage and permanent deafness.

The American Academy of Pediatrics (AAP) recommends measuring the dose intensity of the phototherapy device periodically [2]. However, current practice in Indonesia is to replace phototherapy lamps based on the length of time they are used according to the manufacturer’s recommendations. If we do not apply the current recommendations, then the phototherapy is not effective and it can contribute to severe hyperbilirubinemia which leads to increased morbidity and mortality of newborns in Indonesia. Study from [5] reported that such practice of replacing lamp based on solely on the length of time are used can lead to substandard practice of phototherapy.

The fundamental problem of phototherapy in Indonesia is the unavailability of measuring the intensity of phototherapy because it is still relatively expensive to provide in health facilities, so that this research is expected to produce an innovative output in the form of an affordable price of phototherapy intensity measuring device called PhotoInMeter. Machine learning is a subfield of artificial intelligence and computer science which focuses on using data to simulate the way things work. Machine learning can create a mathematical model that converts the emission from the color sensor and light sensor into light intensity measurements. This research aimed to evaluate the accuracy of PhotoInMeter to estimate the irradiance given by phototherapy device.

Materials and methods

Electrical component selection

The design process for the prototype starts by choosing sensors and electrical components for the prototype. Sensors are chosen based on read data quality and price of the sensor. First, we pick the best color sensor based on our design constraint. The color sensor is used to measure the intensity of red, green, and blue colored light wave. We tried multiple different color sensors, and after several tries, we found that the TCS34725 color sensor works well enough and have a reasonable cost for mass production.

TCS34725 [9] is a color sensor developed by Adafruit. It has RGB and Clear light sensing elements to measure the color of an object. It is also equipped with Infra-Red (IR) blocking filter which minimizes the IR spectral component of the incoming light and allows color measurements to be made accurately. TCS34725 uses Inter-Integrated Circuit (I2C) protocol to communicate with the microcontroller.

Next, we choose the light sensor for our prototype. The purpose of this light sensor is to measure direct intensity of the phototherapy device and room ambient light intensity. For this, we tried 3 different light sensors and experimented with using solar cells as an alternative to light sensor. We found after a few trials that the GY-302 light sensor works best and have a price within reasonable margin. We also found that solar cell measurement results are not very reliable and its size is too big to fit in a small device so it was removed from the final prototype design.

GY-302 Digital Light Intensity Sensor Module is a sensor module based on the BH1750 light sensor. BH1750 [10] is a digital Ambient Light Sensor Integrated Circuit (IC) with an I2C bus interface. It can detect a wide range of light intensity ranging from 0 to 65535 lx. GY-302 uses Inter-Integrated Circuit (I2C) protocol to communicate with the microcontroller.

We use the slightly more expensive organic light-emitting diode (OLED) [11, 12] display for the final model’s display component. OLEDs are light-emitting diodes (LEDs) in which the emissive electroluminescent layer is a film of organic compound that emits light in response to an electric current. OLEDs are used to create digital displays in devices such as television screens, computer monitors, portable systems such as smartphones and handheld game consoles. A major area of research is the development of white OLED devices for use in solid-state lighting applications. We use OLEDs as the OLED displays has a much smaller size and does not produce dim light that can interfere with the light sensor.

Finally, we used NodeMCU [1315] for our microcontroller. NodeMCU is an open-source firmware for which open-source prototyping board designs are available. The firmware uses the Lua scripting language. The firmware is based on the eLua project, and built on the Espressif Non-OS SDK for ESP8266. The prototyping hardware typically used is a circuit board functioning as a dual in-line package (DIP) which integrates a USB controller with a smaller surface-mounted board containing the MCU and antenna. The purpose of the microcontroller is to control the other components and calculating the blue light intensity based on sensor readings. The Wi-Fi module in NodeMCU is for communication purposes, so that PhotoInMeter prototype can be controlled from a smartphone and can send sensor readings to the internet data server.

Other important components in our design include a printed circuit board (PCB), ND filter, and a case. We design a PCB board that can be easily mass produced and can easily connect all components and make them fit in a small handheld device. Neutral-density (ND) filter is used to reduce the intensity of light coming directly into both color and light sensors. This is because it was found in several experiments that without ND filter, PhotoInMeter can only measure up to 30 μW/cm2/nm as the sensor cannot read higher light intensity than 30 μW/cm2/nm.

ND filter reduces incoming light intensity which allows PhotoInMeter to measure more than 120 μW/cm2/nm. Finally, we design a 3D printed case to hold all components, ND filter, and a 9-volt battery as the device’s power supply. The final design of PhotoInMeter prototype can be seen in Fig 1. We estimated that the cost of producing 1 prototype of PhotoInMeter is 20 times more affordable than buying 1 Ohmeda Biliblanket.

The schematic of our circuit is presented in Fig 2 and the final design of our PCB is presented in Fig 3. We connect the Serial Data (SDA) pin of TCS34725, GY-302, and OLED module to NodeMCU’s SDA pin, which is located in D2. We then connect the Serial Clock (SCL) pin of TCS34725, GY-302, and OLED module to NodeMCU’s SCL pin, which is located in D1. We connect the SDA and SCL pin of every module to 1 SDA and SCL pin in NodeMCU to conform with the I2C standard (all modules are connected in 1 line and the microcontroller choses which module it communicates with using device address). We then connect the VCC and GND pin of TCS34725, GY-302, and OLED module to the power source. We also connected the VV and GND pin of the NodeMCU to the power source.

Data collection

After we assemble the prototype, we collect our training data to train the mathematical model. Each training data consist of features and a label. We use PhotoInMeter sensors’ readings as the feature for our training data. The features list consists of the value read by the light sensor, and 3 values (red, green, and blue) read by the color sensor. We then used Ohmeda Biliblanket Light Meter as the reference measurement device. Ohmeda Biliblanket Light Meter is a standard intensity meter produced by General Electric. It is calibrated annually to maintain the accuracy of the device. We use the measurement provided by Ohmeda Biliblanket as the label for our training data.

We use a silhouette model and multiple different phototherapy devices to help collect our training data. We measure the intensity with the help of the silhouette model which represents 5 points: the head, chest, stomach, legs, and feet of the baby. We repeat each measurement 5 times and use the mean of the values. We use multiple phototherapy devices available in RSUD Dr. Soetomo to collect feature data. The details of each phototherapy device is presented in Table 1 (data taken from [7]). We also use a high intensity white LED lamp to collect data with 0–90 μW/cm2/nm intensity. We use white and light-yellow LED lamp to produce a robust mathematical model that avoids overfitting to blue light data and more resistant to white light noise from the environment.

thumbnail
Table 1. Phototherapy (PT) device, type, range of irradiance levels, and distances measured.

https://doi.org/10.1371/journal.pone.0285128.t001

The method in which we collect data is as follows. First, we put silhouette model under phototherapy device in a certain distance. We then measure each reading from Ohmeda Biliblanket Light Meter in each position marked on silhouette model. After that, we collect sensor readings from each marked position on silhouette model and store PhotoInMeter sensor readings and Ohmeda Biliblanket Light Meter measurement. We repeat this procedure until we have enough data to train a robust mathematical model. In each repetition, we slightly modify silhouette model position and distance relative to phototherapy device so that we have a varying degree of light intensity from 0–90 μW/cm2/nm as training data.

Mathematical model

The final step in our process is to make a mathematical model using regression to convert sensor readings to accurate measurements. This process consists of 2 steps: preprocessing the raw data and training our models. We tried 3 different machine learning regression models for our experiments. We will then compare each model to see which model will perform best.

Our preprocessing step consists of data normalization and feature construction. We normalize our measurement training data so that our features are now in the range of about 0–1. We then construct additional features (from our 4 features: light, red, green, and blue) by multiplying each feature with each other to make the second-degree polynomial features (light * light, light * red, light * green, light * blue, red * red, and so on). After this step, we now have 14 different features, and each feature will have a value between 0–1. We will now use these features to train our mathematical model.

For the mathematical model, we use a multivariate linear regression [16], a random forest regressor [17], and an XGBoost regressor [18]. We use Lasso regularization with α = 0.001 for our multivariate linear regression and we use 20 trees with a maximum depth of 5 for the random forest and XGBoost regressor. We build the mathematical model using Scikit-learn [19] and Orange [20, 21] library and use the preprocessed data in the last section to train the model. This process results in a set of weights (for the multivariate regression) or trees (for the random forest and XGBoost) that can be used to convert sensor reading into blue light intensity measurement.

We also add an extra mathematical model to accommodate the variance in hardware sensitivity. We found throughout our experiments that our hardware has some variance in measurement results for the same reading. Fortunately, calculation results from our models still have a high correlation score compared to Ohmeda Biliblanket Light Meter, which implies that a simple linear regression model can be used to improve the results of the first mathematical model.

The device calibration phase is done by collecting several samples of data from Ohmeda Biliblanket Light Meter and the device to be calibrated. We perform 11 measurements for 11 different light intensities using Ohmeda Biliblanket Light Meter and PhotoInMeter with the 3 trained mathematical models. We then perform a linear regression using these 3 sets of data (Biliblanket and multivariate regression, Biliblanket and random forest, Biliblanket and XGBoost). We then take the coefficient and the intercept from each linear regression result to calibrate our devices’ readings. The formula is shown in (1), where f(x) is the output of the first mathematical model, m is the calibration coefficient, c is the calibration intercept, and y is the final reading of the device.

(1)

Results

We evaluate the performance of our mathematical model in two experimental scenarios. In our first scenario, we compare our model’s measurements against those taken using our reference device. This scenario aims to prove that our mathematical model can replicate the behavior of our reference measuring device. For our second scenario, we compare the measurements from multiple prototypes of PhotoInMeter against each other. This scenario aims to prove that our mathematical model can produce similar results even when deployed to different devices.

For the first scenario, we compare the measurements from the PhotoInMeter prototypes against measurements taken using Ohmeda Biliblanket Light Meter. We do this by collecting testing data consisting of the measurements taken with PhotoInMeter prototypes and with Ohmeda Biliblanket Light Meter. We collect our testing data using the same procedure as collecting our training data. We measure the intensity with the help of the silhouette model to position both devices, repeat each measurement 5 times, and use the mean of the values as measurement data. We use the same phototherapy devices available in RSUD Dr. Soetomo to collect testing data.

For our second scenario, we deploy our mathematical model into six different PhotoInMeter prototypes to test our model. We do this by collecting testing data which consists of the measurements taken with 6 different PhotoInMeter prototypes. We use 6 different prototypes to compare the variance of measurements between different devices. Each prototype uses the same color sensor, light sensor, and ND filter. In total, we collected 11 entries of data for each PhotoInMeter device. The result of our measurements for both scenarios 1 and 2 are presented in Table 2.

thumbnail
Table 2. Measurement results from uncalibrated PhotoInMeter devices compared to Ohmeda Biliblanket Light Meter.

https://doi.org/10.1371/journal.pone.0285128.t002

We use mean absolute error (MAE) [22], Pearson correlation coefficient [23], and Bland Altman method [24] as evaluation metrics. The formula for both MAE and Pearson correlation is presented in (2) and (3).

(2)(3)

For our first scenario, we calculate the MAE and Pearson correlation of the PhotoInMeter prototype’s measurements with Ohmeda Biliblanket’s measurements. We present the measurement results of our six uncalibrated devices in Table. Our best measurements have MAEs of 1.773, 1.436, and 1.473 using linear regression, random forest, and XGBoost model, respectively. Meanwhile, the worst measurements have MAEs of 20.18, 19.14, and 17.83 using linear regression, random forest, and XGBoost model, respectively. However, we can see that even though the worst performing device (Device 6) has a very high MAE, we can see that the Pearson correlation score of all devices borders on 1. We present the measurement results of every device after we calibrate it in Table 3. We can see that the MAE has been reduced significantly (0.591, 1.873, and 2.682 using linear regression, random forest, and XGBoost model, respectively), performing as well as the uncalibrated best device.

thumbnail
Table 3. Measurement results from calibrated PhotoInMeter devices compared to Ohmeda Biliblanket Light Meter.

https://doi.org/10.1371/journal.pone.0285128.t003

Bland Altman Plots to compare the best and worst performing Photoinmeter devices before and after calibration to Ohmeda Biliblanket Light Meter are shown in Figs 4 and 5, respectively. Here we can see that our best and worst performing devices agree with Ohmeda Biliblanket Light Meter measurements. We can also see from Fig 5 that our worst-performing uncalibrated device still agrees with Ohmeda Biliblanket Light Meter measurements and can be fixed using a simple linear regression calibration.

thumbnail
Fig 4. Bland Altman Plot to compare the best Photoinmeter device before and after calibration to Ohmeda Biliblanket.

https://doi.org/10.1371/journal.pone.0285128.g004

thumbnail
Fig 5. Bland Altman Plot to compare the worst Photoinmeter device before and after calibration to Ohmeda Biliblanket.

https://doi.org/10.1371/journal.pone.0285128.g005

For our second scenario, we calculate the mean absolute difference between every 2 different devices from 6 devices when measuring the same light intensity. We perform this calculation using the calibrated readings. The result of this calculation is presented in Table 4. We can see that our devices have an insignificant mean absolute difference between them. The low mean absolute difference suggests that our devices gave consistent measurements when receiving similar inputs.

thumbnail
Table 4. Mean absolute difference of measurements for each calibrated device compared to each other.

https://doi.org/10.1371/journal.pone.0285128.t004

Discussion

We have shown from our experiments that our research has successfully created a measurement device that could accurately and reliably replicate the behavior of Ohmeda Biliblanket Light Meter. We achieve over than 0.99 correlation score in all six PhotoInMeter prototypes before calibration. After calibration, our devices achieve an average MAE of 0.83, 1.84, and 1.803 for multivariate linear regression, random forest, and XGBoost, respectively. We also show from our experiment that multiple different PhotoInMeter devices have a high consistency. Our evaluation metrics prove that PhotoInMeter has an average reading difference of 0.435 among calibrated devices. These results mean that we can easily mass produce our prototypes without needing many adjustments or calibrations from the hardware perspective. However, we still need to perform calibration from the software side to mitigate the variance in hardware.

From the mathematical model perspective, we found that our best-performing model is made using multivariate linear regression instead of random forest or XGBoost. We suspect that this may mean that there is a simple mathematical formula that can perfectly map simple color sensor readings to light intensity. It is also possible that the random forest and XGBoost method require more training data with varying cases (such as using bright lights with colors other than blue and white). PhotoInMeter also costs 20 times less to produce compared to Ohmeda Biliblanket Light Meter. Using the same amount of money, we can provide 20 different hospitals with a reliable intensity meter. The ability to mass-produce a reliable intensity meter is essential, as many hospitals in Java, Indonesia, do not have an intensity meter [7]. The result of our research may significantly increase the availability of intensity meters in all hospitals and, in turn, increase the quality-of-care.

Conclusions

This research aims to design an accurate and reliable phototherapy intensity meter with minimal costs. We successfully created PhotoInMeter, an alternative intensity meter that provides accurate reading for low and medium intensity compared to another intensity meter. PhotoInMeter costs 20 times less to produce compared to Ohmeda Biliblanket Light Meter, our reference intensity meter. We achieve more than a 0.99 correlation score in all six PhotoInMeter prototypes. Our best model can achieve 0.83 MAE after calibration compared to Ohmeda Biliblanket Light Meter. PhotoInMeter also has a high consistency among multiple devices, with an average difference of 0.435 among all six devices.

This affordable yet accurate alternative intensity meter can be used to improve the quality-of-care system for Hyperbilirubinemia in developing countries such as Indonesia. In the future, we plan to measure the impact of PhotoInMeter in the quality-of-care system for Hyperbilirubinemia in Indonesia. We will also try to improve the accuracy of higher intensity measurements and define a calibration protocol to mitigate the effects of varying component quality.

Acknowledgments

We acknowledge Indonesia Ministry of Education and Culture and Ministry of Health who supported the research.

References

  1. 1. Burke BL, Robbins JM, Bird T Mac, Hobbs CA, Nesmith C, Tilford JM. Trends in hospitalizations for neonatal jaundice and kernicterus in the United States, 1988–2005. Pediatrics. 2009. pmid:19171618
  2. 2. Kemper AR, Newman TB, Slaughter JL, Maisels MJ, Watchko JF, Downs SM, et al. Clinical Practice Guideline Revision: Management of Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation. Pediatrics. 2022.
  3. 3. Bhutani VK. Phototherapy to Prevent Severe Neonatal Hyperbilirubinemia in the Newborn Infant 35 or More Weeks of Gestation (Technical Report). In: Pediatric Clinical Practice Guidelines & Policies. 2021.
  4. 4. van Imhoff DE, Hulzebos C V., van der Heide M, van den Belt VW, Vreman HJ, Dijk PH, et al. High variability and low irradiance of phototherapy devices in Dutch NICUs. Arch Dis Child Fetal Neonatal Ed. 2013. pmid:22611115
  5. 5. Cline BK, Vreman HJ, Faber K, Lou H, Donaldson KM, Amuabunosi E, et al. Phototherapy device effectiveness in nigeria: Irradiance assessment and potential for improvement. J Trop Pediatr. 2013. pmid:23666953
  6. 6. Satrom K, Slusher T, Satrom J. Effectiveness of Phototherapy Units in Cameroon. J Trop Pediatr. 2014. pmid:24415750
  7. 7. Sampurna MTA, Ratnasari KA, Saharso D, Bos AF, Sauer PJJ, Dijk PH, et al. Current phototherapy practice on Java, Indonesia. BMC Pediatr. 2019. pmid:31176379
  8. 8. Sampurna MTA. Modul Tata Laksana Hiperbilirubinemia. Airlangga University Press; 2020.
  9. 9. AdaFruit. Flora Color Sensor with White Illumination LED—TCS34725 ID: 1356 - $7.95: Adafruit Industries, Unique & fun DIY electronics and kits. Adafruit.com. 2016.
  10. 10. Gao J, Luo J, Xu A, Yu J. Light intensity intelligent control system research and design based on automobile sun visor of BH1750. In: Proceedings of the 29th Chinese Control and Decision Conference, CCDC 2017. 2017.
  11. 11. Gay W, Gay W. OLED. In: Beginning STM32. 2018.
  12. 12. Tsujimura T. OLED Displays: Fundamentals and Applications. OLED Displays: Fundamentals and Applications. 2012.
  13. 13. EINSTRONIC. Nodemcu. Einstronic. 2017.
  14. 14. NodeMCU. Overview—NodeMCU Documentation. https://nodemcu.readthedocs.io. 2018.
  15. 15. Handsontec. ESP8266 NodeMCU WiFi Devkit. Hanson Technol. 2017.
  16. 16. Alexopoulos EC. Introduction to multivariate regression analysis. Hippokratia. 2010;14. pmid:21487487
  17. 17. Pavlov YL. Random forests. Walter de Gruyter GmbH \& Co KG; 2019.
  18. 18. Chen T, Guestrin C. XGBoost. In 2016.
  19. 19. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-learn: Machine learning in Python. J Mach Learn Res. 2011;12:2825–30.
  20. 20. Demšar J, Zupan B, Leban G, Curk T. Orange: From Experimental Machine Learning. In: Knowledge Discovery in Databases: PKDD 2004. 2004.
  21. 21. Demšar J, Curk T, Erjavec A, Gorup Č, Hočevar T, Milutinovič M, et al. Orange: Data Mining Toolbox in Python. J Mach Learn Res [Internet]. 2013;14:2349–53. Available from: http://jmlr.org/papers/v14/demsar13a.html
  22. 22. Willmott CJ, Matsuura K. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim Res. 2005.
  23. 23. VII. Note on regression and inheritance in the case of two parents. Proc R Soc London. 1895.
  24. 24. Bland JM, Altman DG. Statistical methods for assessing agreement between two methods of clinical measurement. International Journal of Nursing Studies. 2010.