Data Mining in Agriculture pp 47-82 | Cite as

# Clustering by *k*-means

## Abstract

Clustering techniques are used for finding suitable groupings of samples belonging to a given set of data. There is no knowledge a priori about these data. Therefore, such set of samples cannot be considered as a training set, and classification techniques cannot be used in this case. The *k*-means algorithm is one of the most popular algorithms for clustering [103]. It is one of the most used algorithms for data mining, as it has been placed among the top 10 algorithms for data mining in [237].

The *k*-means algorithm partitions a set of data into a number *k* of disjoint clusters by looking for inherent patterns in the set. The parameter *k* is usually much smaller than the dimension of the set of samples, and, in general, it needs to have a predetermined value before using the algorithm. There are cases where the value of *k* can be derived from the problem studied. For instance, in the example of the blood test
analysis (see Section 1.1), the aim is to distinguish between healthy and sick patients. Hence, two different clusters can be defined, and then *k* = 2. In other applications, however, the parameter *k* may not be defined as easily. In the example of separating good apples from bad ones (see Section 1.1), images of apples need to be analyzed. The set of apple images can be partitioned in different ways. One partition can be obtained by dividing apples into two clusters, one containing apples with defects and another one containing good apples. In this case *k* = 2. However, defective apples can be classified based on the degree of the defect. For instance, if the apples have a defect which is not very visible, then these apples could be sold with a lower price. Therefore, even defective apples can be grouped in different clusters. In this case, *k* shows the number of defects that are taken into consideration. When there
is uncertainty on the value of the parameter *k*, a set of possible values is considered
and the algorithm is carried out for each of the values. The best obtained partition in clusters can then be considered.

## Keywords

Error Function Fermentation Process Voronoi Diagram Fuzzy Cluster Vector Quantization## Preview

Unable to display preview. Download preview PDF.