Using K-Means Clustering in Python with Periodic Boundary Conditions

Author:

Miniak-Górecka AlicjaORCID,Podlaski KrzysztofORCID,Gwizdałła TomaszORCID

Abstract

Periodic boundary conditions are natural in many scientific problems, and often lead to particular symmetries. Working with datasets that express periodicity properties requires special approaches when analyzing these phenomena. Periodic boundary conditions often help to solve or describe the problem in a much simpler way. The angular rotational symmetry is an example of periodic boundary conditions. This symmetry implies angular momentum conservation. On the other hand, clustering is one of the first and most basic methods used in data analysis. It is often a starting point when new data are acquired and understood. K-means clustering is one of the most commonly used clustering methods. It can be applied to many different situations with reasonably good results. Unfortunately, the original k-means approach does not cope well with the periodic properties of the data. For example, the original k-means algorithm treats a zero angle as very far from an angle that is 359 degrees. Periodic boundary conditions often change the classical distance measure and introduce an error in k-means clustering. In the paper, we discuss the problem of periodicity in the dataset and present a periodic k-means algorithm that modifies the original approach. Considering that many data scientists prefer on-the-shelf solutions, such as libraries available in Python, we present how easily they can incorporate periodicity into existing k-means implementation in the PyClustering library. It allows anyone to integrate periodic conditions without significant additional costs. The paper evaluates the described method using three different datasets: the artificial dataset, wind direction measurement, and the New York taxi service dataset. The proposed periodic k-means provides better results when the dataset manifests some periodic properties.

Funder

University of Lodz

Publisher

MDPI AG

Subject

Physics and Astronomy (miscellaneous),General Mathematics,Chemistry (miscellaneous),Computer Science (miscellaneous)

Reference46 articles.

1. Algorithm AS 136: A K-Means Clustering Algorithm

2. A density-based algorithm for discovering clusters in large spatial databases with noise;Ester;Proceedings of the Second International Conference on Knowledge Discovery and Data Mining (KDD-96),1996

3. Maximum Likelihood from Incomplete Data Via the EM Algorithm;Dempster;J. R. Stat. Soc. Ser. B,1977

4. Mining sequential patterns

5. Discovery of Periodic Patterns in Spatiotemporal Sequences

Cited by 6 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Exploring associations between accident types and activities in construction using natural language processing;Automation in Construction;2024-08

2. Quantifying Disorder in a Protein by Mapping its Locally Correlated Structure and Kinetics;The Journal of Physical Chemistry B;2024-01-26

3. Cluster Analysis on Supply Chain Management-Related Indicators;İnsan ve Toplum Bilimleri Araştırmaları Dergisi;2023-12-31

4. Clustering Car Sales by Brands in R Language: The Example of Türkiye;Uluslararası Davranış, Sürdürülebilirlik ve Yönetim Dergisi;2023-07-07

5. Efficient Design of Automotive Structural Components via De-Homogenization;SAE Technical Paper Series;2023-04-11

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3