Performance Comparison of Bagging Classifiers Between Multi-Core And Single-Core Processors Using Python Multiprocessing

In recent years, the demand for efficient and scalable machine learning algorithms has surged. Bagging (Bootstrap Aggregating) stands out as a widely used ensemble technique that combines multiple base classifiers to enhance predictive accuracy and mitigate over fitting. However, when implementing bagging classifiers in Python, a crucial consideration lies in their effective utilization of multi-core processors. Python, as a language, faces parallelism limitations due to the Global Interpreter Lock (GIL) present in its C implementation (cPython). The GIL restricts Python threads from fully exploiting multiple CPU cores, thereby limiting their concurrency. Consequently, relying solely on regular threads for concurrency would not fully harness the potential of multi-core processors. Python, as a language, faces parallelism limitations due to the Global Interpreter Lock (GIL) present in its C implementation (cPython). The GIL restricts Python threads from fully exploiting multiple CPU cores, thereby limiting their concurrency. Consequently, relying solely on regular threads for concurrency would not fully harness the potential of multi-core processors. To overcome this limitation, we recommend leveraging Python’s multiprocessing module. Unlike threads, which share the same memory space and are subject to the GIL, multiprocessing creates separate processes, each with its own Python interpreter instance. As a result, these processes can run in parallel, effectively utilizing multiple CPU cores. Our study delves into the performance comparison of bagging classifiers on multi-core processors versus single-core using Python multiprocessing. Our experiments reveal that multiprocessing significantly improves execution time, particularly for CPU-bound tasks. By leveraging multiple cores, bagging classifiers can better generalize to unseen data and achieve enhanced predictive accuracy.

Authors

Institutions

Publication Details

Published
2024-11-21
DOI
https://doi.org/10.1109/akgec62572.2024.10867840
Primary Topic
Neural Networks and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Performance Comparison of Bagging Classifiers Between Multi-Core And Single-Core Processors Using Python Multiprocessing

Divya Kumar, Atul Rawat, Charu Krishna
Neural Networks and Applications
article

Performance Comparison of Bagging Classifiers Between Multi-Core And Single-Core Processors Using Python Multiprocessing

Divya Kumar, Atul Rawat, Charu Krishna
article en

Abstract

In recent years, the demand for efficient and scalable machine learning algorithms has surged. Bagging (Bootstrap Aggregating) stands out as a widely used ensemble technique that combines multiple base classifiers to enhance predictive accuracy and mitigate over fitting. However, when implementing bagging classifiers in Python, a crucial consideration lies in their effective utilization of multi-core processors. Python, as a language, faces parallelism limitations due to the Global Interpreter Lock (GIL) present in its C implementation (cPython). The GIL restricts Python threads from fully exploiting multiple CPU cores, thereby limiting their concurrency. Consequently, relying solely on regular threads for concurrency would not fully harness the potential of multi-core processors. Python, as a language, faces parallelism limitations due to the Global Interpreter Lock (GIL) present in its C implementation (cPython). The GIL restricts Python threads from fully exploiting multiple CPU cores, thereby limiting their concurrency. Consequently, relying solely on regular threads for concurrency would not fully harness the potential of multi-core processors. To overcome this limitation, we recommend leveraging Python’s multiprocessing module. Unlike threads, which share the same memory space and are subject to the GIL, multiprocessing creates separate processes, each with its own Python interpreter instance. As a result, these processes can run in parallel, effectively utilizing multiple CPU cores. Our study delves into the performance comparison of bagging classifiers on multi-core processors versus single-core using Python multiprocessing. Our experiments reveal that multiprocessing significantly improves execution time, particularly for CPU-bound tasks. By leveraging multiple cores, bagging classifiers can better generalize to unseen data and achieve enhanced predictive accuracy.

Motilal Nehru National Institute of Technology (IN)
Openalex Percentile: Top 75%
Neural Networks and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Performance Comparison of Bagging Classifiers Between Multi-Core And Single-Core Processors Using Python Multiprocessing — Divya Kumar, Atul Rawat, et al. · (2024) | TGRS Research Map | TGRS