Comparison of Multiprocessor and Multi-Threaded Implementations of the Entropy Approach to Impute Gaps in Data in Python

Authors

Keywords:

data imputation, multiprocessing, multithreading, computation optimization

Abstract

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

Download data is not yet available.

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

Published

2024-06-14

Issue

Section

Information Technology and Cybersecurity

How to Cite

Zemlianyi, O., & Baibuz, O. (2024). Comparison of Multiprocessor and Multi-Threaded Implementations of the Entropy Approach to Impute Gaps in Data in Python. Challenges and Issues of Modern Science, 2, 300-304. https://cims.fti.dp.ua/j/article/view/131

Share