Method for solving the problem of clustering using cellular automata based on heat transfer process
11487974 · 2022-11-01
Assignee
Inventors
Cpc classification
International classification
Abstract
A computer-implemented method, which enables the data to be clustered without being required to perform any distance calculations among the points of the dataset, includes assigning points of a dataset to cells of a cellular automaton; assigning each cell, having a data point assigned, a distinct state value and a constant temperature value; and assigning all cells, to which a data point is not assigned, a unique state value different from the state values utilized for cells having a data point and to a temperature lower than the constant temperature value; selecting a cell in the cellular automaton randomly; calculating the average temperature of the selected cell and its neighbor cells; setting the temperature of the cells having no data point, as the average temperature; if a neighbor cell temperature is above the predetermined threshold value, moving this neighbor cell to the state of the selected cell.
Claims
1. A computer-implemented method which enables to cluster data using an electronic device, wherein, the electronic device comprises a data entry interface to enter rules, data, and number of clusters to be used for clustering the data; a storage unit to store the rules; a processing unit to process the data according to the rules and a monitor to display results to the user; the method comprising: assigning points of a dataset input via the data entry interface to a first plurality of cells of a cellular automaton; assigning each cell from the first plurality of cells a distinct state value and a constant temperature value; and assigning each cell from a second plurality of cells a unique state value different from the distinct state values assigned to the first plurality of cells and a temperature value lower than the constant temperature value, wherein to the second plurality of cells no data point value is assigned; selecting a first cell in the cellular automaton randomly; calculating an average temperature value of the first cell and neighbor cells of the first cell; determining if the first cell and the neighbor cells of the first cell have an assigned data point or not; setting a temperature value of the cells from the first cell and the neighbor cells not having the assigned data point as the average temperature; not updating the temperature value of the cells from the first cell and the neighbor cells having the assigned data point; determining if the temperature of the neighbor cells is above a predetermined threshold value or not; if a neighbor cell temperature is above the predetermined threshold value, moving the neighbor cell to a state of the first cell; determining if a total number of the distinct states has fallen to the number of clusters to be used for clustering the data as a parameter to be given to an algorithm as an input through the data entry interface; if the number of distinct states has fallen to a number equal to the number of clusters to be used for clustering the data, generating a clustering result by grouping cells having a same temperature state and without distance calculations among cells of the cellular automaton or among data instances, displaying the clustering result to the user by the monitor, and terminating the method; otherwise, going back to the step of the selecting the first cell in the cellular automaton randomly.
2. The method according to claim 1, further comprising calculating an index value (i.sub.d) of any data point in dimension d according to the following formula
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The method developed to fulfill the objects of the present invention is illustrated in the following attached figures,
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
DETAILED DESCRIPTION OF THE EMBODIMENTS
(15) In the most basic form; the present invention, which enables to cluster huge datasets efficiently without requiring distance calculations, comprises the following steps; assigning the points of a dataset to the cells of a cellular automaton, assigning each cell, to which a data point is assigned, to a distinct state value and a constant temperature value; and assigning all of the cells, to which a data point is not assigned, to a unique state value different from the state values utilized for cells that contain a data point (for instance state 0) and a temperature value lower than the said constant temperature value, selecting a cell in the cellular automaton randomly, calculating the average temperature value of the selected cell and its neighbor cells, determining if the selected cell and its neighbor cells have an assigned data point or not, setting the temperature of the cells, which do not contain a data point, as the average temperature, not updating the temperature value of the cells containing a data point, determining if the temperature of the neighbor cells is above a predetermined threshold value or not, if a neighbor cell temperature is above the predetermined threshold value, moving this neighbor cell to the state of the selected cell, determining if the total number of distinct states has fallen to the number of clusters which will be used for grouping the dataset as a parameter that would be given to the algorithm as an input through a data entry interface, terminating the process if the number of distinct states has fallen (is equal) to the number of clusters used to group the dataset, otherwise, going back to the step “selecting a cell in the cellular automaton randomly”.
(16) The method of the present invention is a computer application that can be executed by an electronic device (e.g. notebook, desktop, tablet computer, etc.). The said electronic device comprises a storage unit (e.g. a hard disk, flash disk, etc.) for storing the data that will be used in the invention, a processing unit (e.g. a microprocessor) for processing the data with rules, a data entry interface (e.g. a mouse, keyboard or a virtual keyboard) for inputting the said rules, dataset and the number of clusters that will be utilized for clustering the dataset and a monitor (e.g. an LCD monitor, touchscreen, etc.) for displaying the results to the user.
(17) The method of the present invention makes it possible to cluster huge datasets efficiently by using cellular automata without requiring any distance calculations. At the beginning of the procedure, the points in the dataset entered to the system by using a data entry interface is mapped to the cells of an n-dimensional cellular automaton. Each point in the dataset is identified with a certain number of attributes. For instance, the age, the monthly income, the amount of bank deposits, etc. form the attributes of a bank customer. Different datasets have different number of attributes. When a dataset is mapped to a cellular automaton, the number of attributes in the dataset determines the number of dimensions in the cellular automaton. For each attribute, the data point that has the smallest value is mapped to the first cell in the corresponding dimension and certainly the data point with the maximum value is mapped to the last cell.
(18)
(19) The formula used for performing the said mapping is provided in the above equation. The cell index (i.sub.d) of any data point in dimension d is calculated by means of the said formula and the said data point is placed into a cell of the cellular automaton. In the above equation, x.sup.(d) denotes the value of the corresponding data point in dimension d, x.sup.(d).sub.max, x.sup.(d).sub.min denote the minimum and maximum values in dimension d in the dataset, and finally m denotes the number of cells present in cellular automaton in dimension d.
(20) In a standard CA application, each cell in the automata can be in one of a finite number of states, and during the process of computation, each cell can change its state according to the predetermined rules. Certain updates have been carried out on this standard framework in order to utilize the CA model for the clustering task. The method aims to represent the different clusters in the dataset with different states in the cellular automata. Hence, if a group of CA cells are in the same state, then these cells will be in the same cluster. In the beginning of the process, each CA cell that contains a data point is assigned a distinct state. The cells that do not contain data points are accepted to be in state 0. Hence, if there are n points in the dataset, the cells could be in one of the n+1 different states. If more than one data point is assigned to the same cell, then the total number of distinct states in the CA will decrease.
(21) In the proposed method, the cells will change their state again based on the states of the neighboring cells. With the procedures that will be carried out, it is aimed to gradually decrease the number of different states of the cells and consequently to obtain k+1 distinct states in the CA, where k denotes the number of clusters assumed to be in the dataset. Thus, at the end of the procedure, the cells will be in one of the k number of clusters depending on the state thereof. However, some cells could be still in state 0 after the execution. This is why k+1 states will exist in the CA when the operation terminates.
(22) As stated above, the process of forming clusters in the CA is inspired by the heat transfer process in nature. That is why, a temperature value is also kept for each cell in our model besides the state value. In the present method, the cells change their state based on their neighbor cell temperatures. In the beginning of the procedure, the cells, to which a data point is assigned, are considered to be heat sources. Such cells are determined to have a fixed temperature of 100° and this temperature does not change at all throughout the procedure. Yet, the proposed method is not limited to the said temperature value. A higher or lower temperature value can also be used. A simple rule is used to transfer the heat energy generated by these source cells to other cells in the CA. According to this rule, temperature of a cell is determined as the average temperature of itself and its neighbor cells. Temperature of the cells that do not contain a data point will be 0° at the beginning of the procedure. Again, the method of the invention is not limited to the said temperature value. A higher or lower temperature value can also be used. By means of this rule, first of all the neighbor cells (in other words, top, bottom, right and left neighbor cells) near the heat sources (data points) will start to warm up and this process of warming will spread to different regions of the CA. On the other hand, since the cells, which are heat sources, i.e. have data points, have fixed temperatures, they are not affected by this rule.
(23) Concordant to this warming process, there is a second transfer rule utilized in our CA model for changing the states of the cells. This second rule aims the cells to change their states and form a structure that represents the cluster distribution in the dataset. In the present method, if temperature of the neighbor cell of a selected cell is above 80°, the said neighbor cell and the randomly selected cell fall into the same state. Hence when a certain amount of warming up is achieved in the CA, the number of cells in the same state will start to increase and thus the total number of different states in the CA will decrease. Of course when the total number of states decreases to the number of clusters to be used for grouping the data, the procedure is terminated and the results are displayed on the monitor of the electronic device.
(24) In
(25) In
(26) Heat transfer process which has been mentioned above is defined in Algorithm 1.
(27) TABLE-US-00001 Algorithm 1 Heat Transfer in CA procedure HEAT-TRANSFER(CELL C) N←getNeighbour(C) AverageTemperature = calculateAverageTemperature(C,N) ifempty(C) then C.sub.temperature = AverageTemperature end if for each Cell K ∈ Ndo ifempty(K) then K.sub.temperature = AverageTemperature end if end for end procedure
(28) The defined procedure is applied repeatedly on randomly chosen cells. The randomly chosen cell is denoted as C in the algorithm, whereas Nis the set that contains the neighbor cells of cell C. As the first step, the neighbor cells of cell C are determined. Then the average temperature of cell C and its neighbors in Nis calculated. This average temperature is set as the temperature of cell C if cell C does not contain any data point (i.e. is temperature is not fixed to 100). The same procedure is performed for all neighbor cells of cell C. This heat transfer rule enables the neighbor cells to share the heat energy that exists in the environment. The rule utilized has the tendency to equalize the temperature in all cells in the long run. However, as it is stated above, temperature of the cells that contain data points do not change, Therefore these cells constantly provide heat energy to the system. Hence, such cells increase the temperatures of the nearby cells. When this procedure is applied repeatedly on randomly chosen cells, it is possible to enable the regions that have more data points inside to get warmer compared to other regions in the CA.
(29) As mentioned before, a second transfer rule is utilized in the system for changing the states of the cells. Note that, each state in the automaton represents a different cluster. This second rule is presented in Algorithm 2.
(30) TABLE-US-00002 Algorithm 2 State Transfer in CA procedure STATE-TRANSFER(CELL C) ifC.sub.temperature>thresholdthen N←getNeighbour(C) for each Cell K∈Ndo ifK.sub.temperature>thresholdthen K.sub.state = C.sub.state STATE-TRANSFER(K) end if end for end if end procedure
(31) The second rule is also repeatedly executed in parallel to the first rule on randomly chosen cells. When the cells warm up sufficiently enough, they start changing their states based on this second rule. Initially, each cell containing a data point is in a unique state and all other cells are in state 0. As seen in the algorithm, the neighbors of the randomly selected cell C are determined as the first step. If the temperature of a neighbor cell exceeds 80°, which is determined as the threshold value, then the said neighbor cell is moved to the state of the cell C. Additionally, the same algorithm is recursively called on the neighbor cell too. Hence, when sufficient warming is achieved in a certain region, the system enables to spread the cluster corresponding to the said region in the CA very quickly.
(32) In order to determine success rate of the system, experiments are conducted on datasets, which are frequently used in literature, are comprised of different number of clusters and have different cluster forms. Furthermore, a software tool that can generate datasets with different number of data points in different dimensions is also utilized throughout the experiments. The method is tested on these different datasets and the results are compared with K-means algorithm. The datasets which are frequently used in literature to determine the performance of clustering approaches are presented in
(33) In the Table 1, the method of the invention is compared with k-means in terms of performance and efficiency. In the table, success rate of both algorithms are presented on the example datasets in
(34) TABLE-US-00003 TABLE 1 Comparison of the method of the present invention and K-means in terms of performance and efficiency. The method of the K-Means invention Number of Success Success Data Rate Runtime Rate Runtime Dataset Points (%) (sec) (%) (sec) Aggregation 788 78.15 0.02 99.68 5.16 Banana 4811 81.51 0.05 100.0 2.66 Jain 373 88.20 0.01 95.72 12.57 R15 600 80.85 0.01 99.32 1.49 Sizes1 1000 98.20 0.02 98.02 6.13 Chainlink 1000 64.27 0.02 99.83 0.75 3d-2c 70930 99.99 0.58 99.99 1.62 3d-4c 144824 80.69 3.38 97.39 1.37 3d-6c 247087 73.59 10.58 94.53 2.82 3d-8c 405419 72.83 25.17 68.16 5.44 4d-2c 117565 100.0 1.04 100.0 1.26 4d-4c 137973 82.89 4.35 70.26 2.47 4d-6c 178736 72.75 9.08 93.30 1.55 5d-2c 111541 100.0 1.08 100.0 3.10 5d-4c 168799 70.46 9.69 99.93 2.37 5d-6c 162358 71.76 17.49 77.46 1.53 6d-2c 58140 100.0 0.57 92.97 1.49 6d-4c 98116 75.58 5.40 91.12 0.58
(35) K-means algorithm has a remarkable disadvantage. The algorithm requires hyper-spherical clusters in the dataset for a successful clustering. Success rate of k-means declines when datasets do not contain hyper-spherical clusters. For instance, the success rate of K-means goes down to the lowest level (64%) for the “Chainlink” dataset presented in
(36) As seen in