Facile and highly precise pH-value estimation using common pH paper based on machine learning techniques and supported mobile devices
필름·전자재료 · (16) CPI(투명 폴리이미드)
기본 정보
- 저자
- DOI
- 10.1038/s41598-022-27054-5
- 저널
- Scientific Reports
- 발행년도
- 2022
- 발행기관
- Nature Portfolio
- 피인용수
- 14
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1038/s41598-022-27054-5
- 토픽
- Analytical Chemistry and Sensors
- OpenAlex ID
- W4313454943
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (16) CPI(투명 폴리이미드)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > CPI(투명 폴리이미드)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 30,594자
본문 펼치기
섹션 본문 17문단 · 15,893자
(제목 없음)
1Numerous scientific, health care, and industrial applications are showing increasing interest in developing optical pH sensors with low-cost, high precision that cover a wide pH range. Although serious efforts, the development of high accuracy and cost-effectiveness, remains challenging. In this perspective, we present the implementation of the machine learning technique on the common pH paper for precise pH-value estimation. Further, we develop a simple, flexible, and free precise mobile application based on a machine learning algorithm to predict the accurate pH value of a solution using an available commercial pH paper. The common light conditions were studied under different light intensities of 350, 200, and 20 Lux. The models were trained using 2689 experimental values without a special instrument control. The pH range of 1: 14 is covered by an interval of ~ 0.1 pH value. The results show a significant relationship between pH values and both the red color and green color, in contrast to the poor correlation by the blue color. The K Neighbors Regressor model improves linearity and shows a significant coefficient of determination of 0.995 combined with the lowest errors. The free, publicly accessible online and mobile application was developed and enables the highly precise estimation of the pH value as a function of the RGB color code of typical pH paper. Our findings could replace higher expensive pH instruments using handheld pH detection, and an intelligent smartphone system for everyone, even the chef in the kitchen, without the need for additional costly and timeconsuming experimental work.The pH value of different solutions is a particularly important point to determine the optimized conditions and quality control for industrial, biological, chemical, and environmental science either outdoor or indoor applications 1,2 . Hydrogen ions concentration [H + ] denoted to pH scales from 0 to 14, and the most methods counted for detection are complicated, expensive, and time-consuming as microelectrodes 3 , acid-based indicator 4 , potentiometric titration 1 , colorimetric and fluorescence probes application 5-10 . Currently, potentiometric measurements are the most technique used in pH detection. Where the pH of the solution can be calculated by the measurement of the different voltage between the electrodes of the potentiometric device 11 . Despite, the high accuracy of conventional potentiometric devices, the operation and calibration process is more complicated and costly, which is not applicable to indoor or outdoor purposes. However, the easy and accessible pH strips are used as an alternative method for visual pH detection, but the strips produce lower precise results.On the other hand, machine learning (ML) techniques give algorithms the ability to predict novel values from training data derived from experiments using Artificial Intelligence (AI). Thus, there are numerous regression or classification algorithms for ML that depend on hyperparameters and mechanisms to achieve their goals and give high performance for planning 12 . ML is being used in chemistry such as chemical discovery 13 , molecular representations 14 , synthetic chemistry 15 , materials chemistry 16 , aquatic chemistry research 17,18 , and water pollution 19 .Here, the ML technique was used to improve the precision of common strip pH paper. ML models were trained on the 2689 experimental data which covered the whole pH range. Further, we developed a mobile/ web application based on ML algorithms to predict the pH values. Therefore, the developed app could work on mobile which could be used as portable devices for anyone (whether a chemist or not) without additional costs, fast response, and is applicable for different applications.Materials and apparatusAcetic acid, phosphoric acid, boric acid, HCl, and NaOH were used without any further purification (Sigma Aldrich). Universal indicator pH paper (1-14) Q/3211821AB001-2002 (China). The pH measurements were carried out on a 3520 pH Meter (JENWAY, England). Mastech MS6612 Digital Luxmeter Illuminometer Light (Range Peak 200,000 Lux) was used for measuring the light intensity in the experimental workplace. pH buffer solution. Universal Britton-Robinson (B-R) buffer was prepared as reported 20 . Briefly, the stock aqueous B-R buffer solutions (pH = 2.86) by mixing equal molar ratio (1:1:1) of 0.02 mol/L from acetic acid, phosphoric acid, and boric acid. Dropwise of 0.20 mol/L of NaOH or 0.20 mol/L of HCl was used for adjusting the pH values (interval = 0.10) to cover the whole pH range. Vol.:(0123456789) Scientific Reports | (2022) 12:22584 | https://doi.
Machine learning algorithms.
2Regression is a technique used for prediction continues pH values learning and figuring out causal relations between the actual and prediction pH values. Eleven supervised machine learning regression models were applied to the data collected and choose the best model that fits with the selected problem, including Linear Regression (LR), Decision Tree Regressor (DT R ), Random Forest Regressor (RT R ), K Neighbors Regressor (KNN R ), Support Vector Regression (SVR), Lasso regression (L 1 ), Ridge Regression (L 2 ), Elastic Net regressor (EN R ), AdaBoost Regression (AB R ), Gradient Boosting Regressor (GB R ), and Artificial Neural Network Regressor (ANN R ). All models can be found in Scikit-learn in the class model 21 . In addition, the data visualization of exploratory data analysis and heatmap figures were created using the seaborn package based on python code 22 .
3Metrics for regression. Several metrics were used for evaluating the regression models, coefficient of determination (R 2 ), Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE) can be calculated Scikit-learn in class metrics according to Eqs. (1)(2)(3)(4). 23,24 where N is the number of recorded samples, y i is the predicted pH value, and ŷ i is the actual pH value.
4Automated color-information-extraction from the captured images. To extract the color code (RGB) from images, we used a Python 3.7 code based on the OpenCV package to extract the RGB for each image 25 . We noted a small deviation of the RGB values at various positions in one image. Thus, the RGB values were estimated at seven distinct (X, Y) positions (10,10;15,15; 20,20; 25,25; 30,30; 35,35; 40,40) to cover the whole image as illustrated in Fig. 1. pH discrimination with a machine learning model. We exploited a KNN regression modelbased machine learning algorithm to study 2689 collected sample data using Python 3.7 and the scikit-learn package 26,27 . We randomly separated the data into training data (70%, i.e., 1880 samples) and testing data (30%, i.e., 808 samples). In the inference model training phase, the testing data was completely excluded. Furthermore, in machine learning, hyperparameters are those parameters that are explicitly provided by the user to influence the learning process and improve the learning of the model. Thus, we trained our models using a series of integer number [1,2,3,….], and as a result of that the optimal hyperparameters (highest coefficient, and lower errors) was found when we used K = 5. Figure 2 presents collections of 130 captures of an experimentally colored change of the pH paper (at 350 Lux) in the range of (0-14) by an interval of ~ 0.1 pH-value. It is worth mentioning that the traditional estimation based on the color change of pH paper is accompanied by a significant variance in pH value (~ 2). This high variance of pH value led to a noteworthy wrong estimation by eye detection. This finding encourages us to develop a new (1) www.nature.com/scientificreports/ simple and more precise method for pH-value detection. Thus, the experiments were extended to cover most of the three different illumination workplaces at 350, 200, and 20 Lux, that the user could work on. Moreover, the homogeneity of the color of the pH paper was emphasized by the collected color RGB code for seven distinct positions per capture. In total, the data set includes 2689 experimental RGB values from different illumination workplaces.
Result and discussion
5To better understand the observed results in the different workplaces, Exploratory Data Analysis (EDA) of color code RGB against pH values with respect to different light intensities at 20, 200, and 350 Lux, was illustrated in Fig. 3.
6The color code points were collected in three parts in a wide pH range. The significant changes in the color code of Red and Green or even Blue were in the range of (2.5: 9) pH values at the three different investigated workplaces of light intensities at (20,200, and 350 Lux). It is worth mentioning, that the blue color code at lowintensity light of 20 Lux (a little dark workplace) deviates from those obtained in higher or medium light intensity, which suggests avoiding future testing in low light conditions. In contrast, the results revealed no significant difference between the behavior of Red or Green colors at light intensity. The results show the increase in basicity (> 9) or increase in acidity and (< 2.5) could interpret the color and may produce less accurate prediction in that part of the pH range. Thus, this finding may encourage the scientific community to prepare higher sensitive material to work in strong acid and/or Strong base medium.
7Furthermore, it is critical to recognize and evaluate how dependent each parameter is on the others. This knowledge can aid in the definition of the expectations that these interdependencies provide, leading to the creation of more effective pH devices and color-sensitive materials. Because of this, using a machine learning strategy, the statistical Pearson's correlation coefficients (r x,y ) between the pH parameters were investigated based on the following Eqs. (5) and (6): The correlation between the pH parameters was presented with a heatmap in Fig. 4. The obtained results reflect an excellent higher negative correlation between the pH values with Red color (−0.77). In the same way, an acceptable correlation of pH value with the green color by (−0.38). The blue color showed an incredibly low correlation with pH value (0.044) from those observed in the red or green colors. This refers to that the blue color will have a small effect on the machine learning prediction compared to the red and green colors. In the www.nature.com/scientificreports/ same way, the illumination of workplaces has no significant effect on the pH value by −0.03. Thus, the colored pH paper can be safely captured whatever the light intensity.
ML model prediction.
8Using experimental data, a preliminary analysis of machine learning regression techniques was performed with optimal hyperparameters on K-Nearest Neighbors (KNN), Linear, Lasso, Elastic Net, AdaBoost, Neural Network, Random Forest, and Support vector machine (SVM), and Gradient Boosting Regressor algorithms [28][29][30] to estimate coefficients of determination (R 2 ) and the minimum errors of the corresponding regression evaluation metrics concerning root mean squared error (RMSE), mean absolute error (MAE), and mean squared error (MSE) as shown in Fig. 5 and recorded in Table 1.
9It's obvious that the KNN model with optimal hyperparameters of five points performs significant result of R 2 (0.993) combined with the lowest errors of MSE, RMSE, and MAE (0.012, 0.320, and 0.182, respectively) compared to other models. In addition, the coefficient of the variation of the root means square error (CVRMSE) of KNN models shows a higher stability performance of 4.077 compared to other models. Further, the crossvalidation with K-fold of (3, 5, 10, and 20) was tested for confirming the stability of the models. However, no significant difference was found between the results, which verified the KNN models.
10To deepen understanding, further investigation showed that the results of the model's prediction (based on test data) vs the experimentally obtained pH values are represented in the scatter plot in Fig. 6. The linear regression, elastic net, and Neural network algorithms could not recognize the whole experimental points, especially at the strong acid/base pH range. However, a precise estimate would be placed along a square-diameter line using KNN, Gradient boosting, Random Forest, and AdaBoost algorithms, which could be selected for further steps of deploying the code. Despite the higher performance and exceedingly small deviation of those algorithms, the KNN was chosen for deploying the machine learning mobile application due to having the lowest errors (RMSE; 0.32) and higher stability (CVRMSE; 4.08) as well.
11It is now clear that the KNN model can successfully show the underlying patterns of the color RGB code in the pH value estimation based on experimental data collections. Thus, the machine learning approach based on this model was further expanded and used to develop a versatile platform able to predict the pH value using common pH paper with high accuracy. The online mobile application of the prediction model was developed www.nature.com/scientificreports/ using python code and streamlit cloud (freely available) and permits the highly predicted determination of the pH value as a function of the RGB color code of common pH paper. As illustrated in Fig. 7 the mobile application includes three steps; starting with the input file which could be able to insert the pH paper capture (after being immersed in the target solution immediately). For more facility, we have coded three options (upload a picture, use a mobile camera, or insert a RGB color code). This step is followed by a built-in Machin learning process (without control from the user). Finally, the output of the pH value will appear on the screen.
12Our study has a significant advantage over what is already used, Fig. 8 shows the fair comparison of pH instruments, pH paper, and the current study.
13Furthermore, Fig. 9 shows the estimated pH value (output results) of the proposed mobile application in comparison with the real pH value. Interestingly, this correlation between real and estimated values in the whole range of pH (acid or base) is related to the higher accuracy of the used ML model.
14However, Solmaz et al. 31 studied pH strips colorimetric detection using ML, as presented in Table 2. However, four different types of smartphones were used to check the accuracy of pH value predictions for three buffer solutions (pH = 3, 7, and 10). The default setting was used to avoid any smartphone effects. As shown in Fig. 10 and Table 3, the various smartphones do have no significantly different pH value estimations with an accuracy of more than 90% for each type.
15Furthermore, Table 4 shows recommended conditions and limitations for using the application to achieve more accurate predictions.
16Overall, the present findings solve the problem of pH accuracy using common pH paper without the need for additional costly and time-consuming experimental work. However, our approach solves the problems of excessive cost and maintenance required for traditional pH meters. www.nature.com/scientificreports/
Conclusion
17The findings demonstrate a strong negative association between pH values and both the red color (−0.77) and the green color (−0.38). The blue color will have an insignificant impact on machine learning prediction which revealed a low correlation (0.044). The KNN model exhibits significant R 2 (0.993) results along with the lowest MSE, RMSE, and MAE errors (0.012, 0.320, and 0.182, respectively). This paper also demonstrated the potential of the ML approach to estimate the pH value of solutions using common pH paper. We developed a freely available application that supported mobile devices to predict the pH value based on ML and using common pH paper with precise results. Future research should consider the preparation of new optical material with extremely sensitive color changes in a strong acid/base medium.
참고문헌 28건
- The Symbol for pH Journal of Chemical Education · American Chemical Society · 2004 10.1021/ed081p21
- Ch OpenCV for interactive open architecture computer vision Advances in Engineering Software · Elsevier BV · 2004 10.1016/j.advengsoft.2004.05.003
- Using kNN model for automatic text categorization Soft Computing · Springer Science+Business Media · 2005 10.1007/s00500-005-0503-y
- A big data approach to the ultra-fast prediction of DFT-calculated bond energies Journal of Cheminformatics · BioMed Central · 2013 10.1186/1758-2946-5-34
- CXCVIII.—Universal buffer solutions and the dissociation constant of veronal Journal of the Chemical Society (Resumed) · Chemical Society · 1931 10.1039/jr9310001456
- Measurement of pH. Definition, standards, and procedures (IUPAC Recommendations 2002) Pure and Applied Chemistry · International Union of Pure and Applied Chemistry · 2002 10.1351/pac200274112169
- Highly sensitive spectrofluorimetric analysis and Molecular Docking using benzocoumarin hydrazide derivative doped in sol-gel matrix as optical sensor Sensors and Actuators B Chemical · Elsevier BV · 2016 10.1016/j.snb.2016.04.024
- Machine-learning-assisted materials discovery using failed experiments Nature · Nature Portfolio · 2016 10.1038/nature17439
- Smartphone-based colorimetric detection via machine learning The Analyst · Royal Society of Chemistry · 2017 10.1039/c7an00741h
- A dual functional colorimetric and fluorescence chemosensor based on benzo[f]fluorescein dye derivatives for copper ions and pH; kinetics and thermodynamic study Sensors and Actuators B Chemical · Elsevier BV · 2017 10.1016/j.snb.2017.06.084
- Novel and economic acid-base indicator based on ( p -toluidine) oligomer: Synthesis; characterization and solvatochromism applications Spectrochimica Acta Part A Molecular and Biomolecular Spectroscopy · Elsevier BV · 2017 10.1016/j.saa.2017.06.028
- Dual functional colorimetric and turn-off fluorescence probe based on pyrrolinone ester hydrazone dye derivative for Cu2+ monitoring and pH change Dyes and Pigments · Elsevier BV · 2019 10.1016/j.dyepig.2019.107549
- Review—Machine Learning Techniques in Wireless Sensor Network Based Precision Agriculture Journal of The Electrochemical Society · Institute of Physics · 2019 10.1149/2.0222003jes
- Kernel functions embedded in support vector machine learning models for rapid water pollution assessment via near-infrared spectroscopy The Science of The Total Environment · Elsevier BV · 2020 10.1016/j.scitotenv.2020.136765
- Colorimetric Chemosensor and Turn on Fluorescence Probe for pH Monitoring Based on Xanthene Dye Derivatives and its Bioimaging of Living Escherichia coli Bacteria Journal of Fluorescence · Springer Science+Business Media · 2020 10.1007/s10895-020-02522-1
- Recent advances in artificial intelligence and machine learning for nonlinear relationship analysis and process control in drinking water treatment: A review Chemical Engineering Journal · Elsevier BV · 2020 10.1016/j.cej.2020.126673
- Photophysical, DFT and molecular docking studies of Sm(III) and Eu(III) complexes of newly synthesized coumarin ligand Inorganic Chemistry Communications · Elsevier BV · 2020 10.1016/j.inoche.2020.108213
- Molecular Machine Learning: The Future of Synthetic Chemistry? Angewandte Chemie International Edition · Wiley · 2020 10.1002/anie.202008366
- Critical review of machine learning applications in perovskite solar research Nano Energy · Elsevier BV · 2020 10.1016/j.nanoen.2020.105546
- Machine learning for perovskite materials design and discovery npj Computational Materials · Nature Portfolio · 2021 10.1038/s41524-021-00495-8
- Fluorescent sensor array for high-precision pH classification with machine learning-supported mobile devices Dyes and Pigments · Elsevier BV · 2021 10.1016/j.dyepig.2021.109492
- Applications of computational chemistry, artificial intelligence, and machine learning in aquatic chemistry research Chemical Engineering Journal · Elsevier BV · 2021 10.1016/j.cej.2021.131810
- Multi-functional colorimetric chemosensor for naked eye recognition of Cu2+, Zn2+ and Co2+ using new hybrid azo-pyrazole/pyrrolinone ester hydrazone dye Dyes and Pigments · Elsevier BV · 2021 10.1016/j.dyepig.2021.109795
- Cricket Match Analytics Using the Big Data Approach Electronics · Multidisciplinary Digital Publishing Institute · 2021 10.3390/electronics10192350
- Machine learning-guided search for high-efficiency perovskite solar cells with doped electron transport layers Journal of Materials Chemistry A · Royal Society of Chemistry · 2021 10.1039/d1ta08194b
- Learning to predict test effectiveness International Journal of Intelligent Systems · Wiley · 2021 10.1002/int.22722
- Molecular representations for machine learning applications in chemistry International Journal of Quantum Chemistry · Wiley · 2021 10.1002/qua.26870
- Powder microelectrodes Journal of Electroanalytical Chemistry · Elsevier BV · 1994 10.1016/0022-0728(93)03016-i