arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.12052cs.DCcs.LG
收藏

K-Means算法的并行化及其在大数据聚类中的应用

Parallelization of the K-Means Algorithm with Applications to Big Data Clustering

Indian Institute of Technology Madras(马德拉斯印度理工学院)

Ashish Srivastava, Mohammed Nawfal

AI总结:

针对K-Means串行聚类距离计算开销大的问题,比较OpenMP平面同步与基于OpenACC的GPU并行方案,并通过加速比、效率和耗时评估性能。

摘要:

使用LLoyd算法的K-Means聚类是一种将给定数据集划分为K个不同簇的迭代方法。该算法依据如下目标函数将每个点分配到相应簇:min Σ_{i=1}^{n}||x_i-μ_{x_i}||^2。串行算法包含若干迭代步骤:计算每个数据点到各质心的距离,并将该数据点分配给最近的质心。这一方法本质上被称为期望最大化步骤。聚类需要在每次迭代中进行大量距离计算,且计算量会随数据点数量增加而增长,这为并行化提供了空间。然而,在并行过程中必须确保每个线程都能访问更新后的质心值,并且任何质心值上都不存在竞态条件。本项目将比较两种不同方法。第一种是OpenMP平面同步方法,其中所有进程并行运行,并使用同步确保簇的安全更新。第二种采用基于GPU的并行化方法,使用OpenACC,尝试利用GPU架构将算法的各部分并行化,以观察计算时间的降低。我们将分析加速比、效率、随数据点变化的耗时以及进程数量等指标,以比较这两种方法,并理解可获得的相对性能提升。

英文摘要:

The K-Means clustering using LLoyd's algorithm is an iterative approach to partition the given dataset into K different clusters. The algorithm assigns each point to the cluster based on the following objective function \[\ \min Σ_{i=1}^{n}||x_i-μ_{x_i}||^2\] The serial algorithm involves iterative steps where we compute the distance of each datapoint from the centroids and assign the datapoint to the nearest centroid. This approach is essentially known as the expectation-maximization step. Clustering involves extensive computations to calculate distances at each iteration, which increases as the number of data points increases. This provides scope for parallelism. However, we must ensure that in a parallel process, each thread has access to the updated centroid value and no racing condition exists on any centroid values. We will compare two different approaches in this project. The first approach is an OpenMP flat synchronous method where all processes are run in parallel, and we use synchronization to ensure safe updates of clusters. The second approach we adopt is a GPU based parallelization approach using OpenACC wherein we will try to make use of GPU architecture to parallelize chunks of the algorithm to observe decreased computation time. We will analyze metrics such as speed up, efficiency,time taken with varying data points, and number of processes to compare the two approaches and understand the relative performance improvement we can get.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑