Research Article
Improvement of K-Means Algorithm and Its Application in Air Passenger Grouping
| Input: Dataset , cluster number , scale factor | | Output: Clustering results , center points set , sum of squared error | (1) | Using (6) divide dataset into | (2) | Using (2) generate | (3) | For to do | (4) | Using (3) generate | (5) | End for | (6) | For to do | (7) | for do | (8) | According to the principle of the nearest distance between and , classify into the corresponding cluster | (9) | end for | (10) | if does not change then | (11) | break | (12) | end if | (13) | end for | (14) | Update the center points set and compute | (15) | Compute the optimal center points | (16) | for do | (17) | According to the principle of the nearest distance between and , classify into the corresponding cluster | (18) | end for | (19) | Compute | (20) | Return clustering results , center points set , sum of squared error |
|