Comparison of Multiprocessor and Multi-Threaded Implementations of the Entropy Approach to Impute Gaps in Data in Python
Keywords:
data imputation, multiprocessing, multithreading, computation optimizationAbstract
The comparison of sequential, multi-processor, and multi-threaded implementations of the entropy-based approach for data imputation is being considered in Python programming language. The main goal of the work is to investigate approaches to optimizing computations when implementing the entropy-based approach for data imputation. The authors explain the limitations of Python's interpreter regarding multi-threading due to the presence of the Global Interpreter Lock (GIL), which prevents full parallel data processing in a multi-threaded environment. Instead, they propose using multi-processor calculating, where each process has its own Python interpreter and GIL, allowing for efficient distribution of computational tasks across multiple processor cores. For the experimental part of the work, the UCI Heart Disease Data dataset, hosted on the Kaggle platform, is used. Artificial introduction of gaps is performed, then imputation using various implementations based on the entropy approach, assessing the accuracy of imputation and the runtime of algorithms. The authors consider three approaches: sequential, multi-threaded, and multi-processor, and compare their efficiency. The research results show that the multi-threaded approach does not provide an advantage in speed compared to the sequential approach and sometimes even worsens productivity due to time spent on thread switching. Conversely, the multi-processor approach demonstrates a reduction in computation time, confirming its effectiveness for data imputation tasks. In the conclusions, the authors note that optimizing computations in Python requires consideration of GIL peculiarities and recommend using multi-processor computations to achieve better productivity. Recommendations for further optimization are provided, including the use of vectorized computations and avoiding excessive input-output operations. This work is of practical importance for data science researchers working with Python and facing challenges in parallel data processing.
Downloads
References
Delavallade, T., & Dang, T. H. (2007, July). Using entropy to impute missing data in a classification task. In 2007 IEEE Inter-national Fuzzy Systems Conference (pp. 1-6). IEEE. https://doi.org/10.1109/FUZZY.2007.4295430
Initialization, Finalization, and Threads — Python 2.7.18 documentation. (б. д.). 3.12.3 Documentation. https://docs.python.org/2/c-api/init.html#threads
UCI Heart Disease Data. (б. д.). Kaggle: Your Machine Learning and Data Science Community. https://www.kaggle.com/datasets/redwankarimsony/heart-disease-data
Zemlianyi, O., & Baibuz, O. (2024). Methods for imputing miss-ing data on coronary heart disease. System technologies, 2(151), 33-49. https://doi.org/10.34185/1562-9945-2-151-2024-04
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Олексій Земляний, Олег Байбуз (Автор)
![Creative Commons License](http://i.creativecommons.org/l/by/4.0/88x31.png)
This work is licensed under a Creative Commons Attribution 4.0 International License.
All articles published in the journal Challenges and Issues of Modern Science are licensed under the Creative Commons Attribution 4.0 International (CC BY) license. This means that you are free to:
- Share, copy, and redistribute the article in any medium or format
- Adapt, remix, transform, and build upon the article
as long as you provide appropriate credit to the original work, include the authors' names, article title, journal name, and indicate that the work is licensed under CC BY. Any use of the material should not imply endorsement by the authors or the journal.