Comparative Analysis of Fuzzy Logic Models for Depression Prediction: Python and LabVIEW Approaches
Abstract
Depression is one of the mental disorders with a significant impact on individuals' quality of life and productivity. The diagnostic process for depression, which typically relies on subjective assessment, often encounters challenges of uncertainty and variability in symptoms. This study aims to develop a fuzzy model for predicting depression levels based on five primary symptom variables: worthlessness, concentration, suicidal ideation, sleep disturbance, and hopelessness. The model is implemented on two platforms, Python and LabVIEW, to evaluate the accuracy and consistency of prediction results between these platforms. The analysis process begins with data preprocessing, input variable fuzzification, inference using 243 fuzzy rules, and defuzzification to generate a crisp output value classified into four depression levels: No Depression, Mild, Moderate, and Severe. The study results indicate a very small error margin between the two platforms, with error values below 0.01 in each trial. These findings suggest that both Python and LabVIEW can produce nearly identical and consistent predictions. This conclusion supports the effectiveness of fuzzy logic in addressing uncertainty in clinical data, especially for cases of depression with varying symptoms. Nonetheless, there are limitations related to the subjectivity in selecting membership functions and rules, as well as limitations in the number of variables used. Therefore, this study recommends expanding the developed fuzzy model with additional variables or integrating it with machine learning approaches to improve prediction accuracy. These findings are expected to serve as a foundation for the development of fuzzy-based systems in future mental health diagnostics.
Downloads
References
F. Boumehrez, “Fuzzy logic inference system based quality prediction model for HD HEVC video streaming over wireless networks,” 2nd IEEE International Conference on New Technologies of Information and Communication, NTIC 2022 - Proceeding. 2022, doi: 10.1109/NTIC55069.2022.10100595.
D. C. Lombera, “Driver model using fuzzy logic for virtual validation,” Advances in Transdisciplinary Engineering, vol. 50. pp. 31–43, 2024, doi: 10.3233/ATDE240019.
N. Mahmoudi, “Mutating fuzzy logic model with various rigorous meta-heuristic algorithms for soil moisture content estimation,” Agric. Water Manag., vol. 261, 2022, doi: 10.1016/j.agwat.2021.107342.
A. H. I. Lee, “A Three-Phased Fuzzy Logic Multi-Criteria Decision-Making Model for Evaluating Operation Systems for Smart TVs,” Appl. Sci., vol. 13, no. 13, 2023, doi: 10.3390/app13137869.
E. F. A. Sihotang, “Fuzzy Logic based Decision Support Model for Determining the Subject of Online Course Materials,” J. Syst. Manag. Sci., vol. 12, no. 5, pp. 169–192, 2022, doi: 10.33168/JSMS.2022.0511.
R. Pakhira, “Developing a fuzzy logic-based carbon emission cost-incorporated inventory model with memory effects,” Ain Shams Eng. J., vol. 15, no. 6, 2024, doi: 10.1016/j.asej.2024.102746.
M. H. Talib, “Predicted of Cost Parameters in Construction Projects Using Fuzzy Logic Inference Model,” AIP Conference Proceedings, vol. 2977, no. 1. 2023, doi: 10.1063/5.0182242.
M. Crenganiș, “Fuzzy Logic-Based Driving Decision for an Omnidirectional Mobile Robot Using a Simulink Dynamic Model,” Appl. Sci., vol. 14, no. 7, 2024, doi: 10.3390/app14073058.
Zain Muzadid Zamzani, M. Ryan Nurdiansyah N.A, and Baktiar Yudha Yana, “Human Stress Detection Through Sleep Analysis With Fuzzy Method,” TECHNOVATAR J. Teknol. Ind. dan Inf., vol. 1, no. 1, pp. 58–71, Oct. 2023, doi: 10.61434/technovatar.v1i1.60.
A. K. Nisa, M. Abdy, and A. Zaki, “Application of Fuzzy Logic to Determine the Best Packaged Milk Drink in Nutritional Optimization,” J. Math. Comput. Stat., vol. 3, no. 1, p. 51, May 2020, doi: 10.35580/jmathcos.v3i1.19902.
R. Nursyanti, V. M. Nasution, and C. Kurniawan, “Fuzzy Logic Mamdani Method For Employee Recruitment Decision Support,” Explor. Sist. Inf. dan Telemat., vol. 12, no. 1, p. 72, Jul. 2021, doi: 10.36448/jsit.v12i1.2008.
K. Upreti, “Fuzzy Logic Based Support Vector Regression (SVR) Model for Software Cost Estimation Using Machine Learning,” Lecture Notes in Networks and Systems, vol. 321. pp. 917–927, 2022, doi: 10.1007/978-981-16-5987-4_90.
T. Abdullayev, “Application of Fuzzy Logic Model for Optimal Solution of Light Reflection Value in Lighting Calculations,” Lecture Notes in Networks and Systems, vol. 362. pp. 384–391, 2022, doi: 10.1007/978-3-030-92127-9_53.
S. Hrehová, “The Fuzzy Logic Predictive Model for Remote Increasing Energy Efficiency,” Mob. Networks Appl., vol. 28, no. 4, pp. 1293–1305, 2023, doi: 10.1007/s11036-022-02050-1.
I. Ahmad, “Fuzzy logic control of an artificial neural network-based floating offshore wind turbine model integrated with four oscillating water columns,” Ocean Eng., vol. 269, 2023, doi: 10.1016/j.oceaneng.2022.113578.
F. A. Lefta, “Integrated fuzzy logic and multicriteria decision model methods for selecting suitable sites for wastewater treatment plant: A case study in the center of Basrah, Iraq,” Open Eng., vol. 13, no. 1, 2023, doi: 10.1515/eng-2022-0439.
D. Andrade-Benavides, “Fuzzy Logic Model for Failure Analysis in Electric Power Distribution Systems,” Procedia Computer Science, vol. 204. pp. 497–504, 2022, doi: 10.1016/j.procs.2022.08.061.
D. N. Utama, “The Floating Fuzzy Logic based Evaluation Model for Appraising the Student Performance,” Proceeding - 6th International Conference on Information Technology, Information Systems and Electrical Engineering: Applying Data Sciences and Artificial Intelligence Technologies for Environmental Sustainability, ICITISEE 2022. pp. 139–142, 2022, doi: 10.1109/ICITISEE57756.2022.10057629.
K. Godfrey, “Fuzzy Logic-Based Driven Model for Detection and Prediction of Diabetes Mellitus Type 2,” Proceedings of the 2023 IEEE International Conference on Advanced Systems and Emergent Technologies, IC_ASET 2023. 2023, doi: 10.1109/IC_ASET58101.2023.10150948.
H. E. Glida, “Optimal model-free fuzzy logic control for autonomous unmanned aerial vehicle,” Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng., vol. 236, no. 5, pp. 952–967, 2022, doi: 10.1177/09544100211025379.
Y. Li, “Prediction Model for Geologically Complicated Fault Structure Based on Artificial Neural Network and Fuzzy Logic,” Sci. Program., vol. 2022, 2022, doi: 10.1155/2022/2630953.
K. Kakouche, “Model Predictive Direct Torque Control and Fuzzy Logic Energy Management for Multi Power Source Electric Vehicles,” Sensors, vol. 22, no. 15, 2022, doi: 10.3390/s22155669.
S. Qazi, “Fuzzy Logic-Based Hybrid Models for Clinical Decision Support Systems in Cancer,” Studies in Computational Intelligence, vol. 1016. pp. 201–213, 2022, doi: 10.1007/978-981-16-9221-5_12.
R. Trach, “A Study of Assessment and Prediction of Water Quality Index Using Fuzzy Logic and ANN Models,” Sustain., vol. 14, no. 9, 2022, doi: 10.3390/su14095656.
S. R, “Adaptive fuzzy logic inspired path longevity factor-based forecasting model reliable routing in MANETs,” Sensors Int., vol. 3, 2022, doi: 10.1016/j.sintl.2022.100201.
A. Sharma, “Fuzzy Logic Based Model to Predict Surface Roughness of Si(100) Wafer Using Preliminary Experimental Data Obtained From Single Pole Magnetic Abrasive Finishing Process,” Silicon, vol. 16, no. 10, pp. 4199–4212, 2024, doi: 10.1007/s12633-024-02986-x.
S. Chakravarty, “Fuzzy Logic-Based Model for Predicting Material Removal Rate of Machined Cupola Slag-Reinforced Aluminum Metal Matrix Composite,” Springer Proceedings in Materials, vol. 25. pp. 167–177, 2023, doi: 10.1007/978-981-99-3844-5_19.
N. Berutu and Sriani, “Detection of Work Depression Levels in Elementary School Teachers Using the Fuzzy Mamdani Method,” J. FASILKOM (teknologi Inf. dan ILmu KOMputer), vol. 14, no. 2, 2024, doi: 10.37859/jf.v14i2.7739.

Copyright (c) 2024 Indonesian Journal of Data and Science

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
License and Copyright Agreement
In submitting the manuscript to the journal, the authors certify that:
- They are authorized by their co-authors to enter into these arrangements.
- The work described has not been formally published before, except in the form of an abstract or as part of a published lecture, review, thesis, or overlay journal.
- The work is not under consideration for publication elsewhere.
- The work has been approved by all the author(s) and by the responsible authorities – tacitly or explicitly – of the institutes where the work has been carried out.
- They secure the right to reproduce any material that has already been published or copyrighted elsewhere.
- They agree to the following license and copyright agreement.
Copyright
Authors who publish with Indonesian Journal of Data and Science agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. (CC BY-NC 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.