This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-reloaded:clustering_models [2024/09/25 12:30] – agrisnik | en:iot-reloaded:clustering_models [2024/12/10 21:34] (current) – pczekalski | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Clustering Models ====== | ====== Clustering Models ====== | ||
- | {{: | + | |
===== Introduction ===== | ===== Introduction ===== | ||
Line 6: | Line 6: | ||
Clustering is a methodology that belongs to the class of unsupervised machine learning. It allows for finding regularities in data when the group or class identifier or marker is absent. To do this, the data structure is used as a tool to find the regularities. Because of this powerful feature, clustering is often used as part of data analysis workflow prior to classification or other data analysis steps to find natural regularities or groups that may exist in data. | Clustering is a methodology that belongs to the class of unsupervised machine learning. It allows for finding regularities in data when the group or class identifier or marker is absent. To do this, the data structure is used as a tool to find the regularities. Because of this powerful feature, clustering is often used as part of data analysis workflow prior to classification or other data analysis steps to find natural regularities or groups that may exist in data. | ||
- | This provides very insightful information about the data's internal organisation, | + | This provides very insightful information about the data's internal organisation, |
- | One might consider grouping customers by income estimate to explain the clustering better. It is very natural to assume some threshold values of 1KEUR per month, 10KEUR per month etc. However: | + | One might consider grouping customers by income estimate to explain the clustering better. It is natural to assume some threshold values of 1KEUR per month, 10KEUR per month, etc. However: |
* Do the groups reflect a natural distribution of customers by their behaviour? | * Do the groups reflect a natural distribution of customers by their behaviour? | ||
* For instance, does a customer with 10KEUR behave differently from the one with 11KEUR per month? | * For instance, does a customer with 10KEUR behave differently from the one with 11KEUR per month? | ||
- | It is obvious | + | It is evident |
In this context, a **cluster** refers to a collection of data points aggregated together because of certain similarities ((Understanding K-means Clustering in Machine Learning | by Education Ecosystem (LEDU) | Towards Data Science [[https:// | In this context, a **cluster** refers to a collection of data points aggregated together because of certain similarities ((Understanding K-means Clustering in Machine Learning | by Education Ecosystem (LEDU) | Towards Data Science [[https:// | ||
Line 17: | Line 17: | ||
* Cluster **centroid-based**, | * Cluster **centroid-based**, | ||
* Cluster **density-based**, | * Cluster **density-based**, | ||
- | In both cases, a distance measure estimates the distance among points or objects and the density of points around the given. Therefore, all factors used should | + | In both cases, a distance measure estimates the distance among points or objects and the density of points around the given. Therefore, all factors used should be numerical, assuming an Euclidian space. |
- | ===== DBSCAN ===== | ||
- | DBSCAN (Density-Based Spatial Clustering of Applications with Noise) employs density measures to mark points in high-density regions and those in low-density regions – the noise. Because of this natural behaviour of the algorithm, it is particularly useful in signal processing and similar application domains. | + | ==== Data preprocessing before clustering ==== |
- | ((Ester, Martin; Kriegel, Hans-Peter; Sander, Jörg; Xu, Xiaowei (1996). Simoudis, Evangelos; Han, Jiawei; Fayyad, Usama M. (eds.). A density-based algorithm for discovering clusters in large spatial databases with noise (PDF). Proceedings of the Second International Conference on Knowledge Discovery and Data Mining (KDD-96). AAAI Press. pp. 226–231. CiteSeerX 10.1.1.121.9220. ISBN 1-57735-004-9.)). | + | |
- | One of the essential concepts is the point' | + | Before starting clustering, several necessary steps have to be performed: |
- | <figure Point' | + | * **Check if the used data is metric:** In clustering, the primary measure is Euclidian distance (in most cases), which requires numeric data. While it is possible to encode some arbitrary data using numerical values, they must maintain the semantics of numbers, i.e. 1 < 2 < 3. Good examples of natural metric data are temperature, |
- | {{ {{ :en:iot-reloaded:ClusterEq3.png?300 | Point' | + | * **Select the proper scale:** For the same reasons as the distance measure, the values of each dimension should be on the same scale. For instance, customers' |
- | < | + | * **Unity interval:** A minimal factor value is subtracted from the given point value and divided by the interval value, giving the result 0 to 1. |
- | </ | + | * **Z-scale: |
- | , where: | ||
- | * **p** – the point of interest; | ||
- | * **N(p)** – neighbourhood of the point p; | ||
- | * **q** – any other point; | ||
- | * **distance(p, | ||
- | * **eps** – epsilon – user-defined distance constant; | ||
- | * **D** – the initial set of points available for the algorithm; | ||
- | The algorithm treats different points differently depending on density | + | ==== Summary about clustering ==== |
+ | * There are many other clustering methods besides the discussed ones; however, all of them, including the discussed ones, require prior knowledge of the problem domain. | ||
+ | * All clustering methods require setting some parameters that drive the algorithms. In most cases, the value setting might not be intuitive | ||
+ | * Proper data coding in clustering may provide a significant value even in complex application domains, including medicine, customer behaviour analysis, and finetuning of other data analysis algorithms. | ||
+ | * In data analysis, clustering is one of the first methods used to acquire the internal structure of the data before applying more informed methods. | ||
- | - Core Points: | + | <WRAP excludefrompdf> |
- | * A point is a core point if it has at least MinPts neighbours within a distance eps, where MinPts and eps are user-defined parameters, i.e. N(p) ≥ MinPts. | + | To illustrate the mentioned algorithm groups, the following algorithms |
- | - Directly Density-Reachable points: | + | |
- | * A point is directly density-reachable from a core point if it lies within the distance | + | |
- | - Border Points: | + | </ |
- | - Noise points: | + |