Research Article
Meteorological Data Analysis Using MapReduce
//Combine(key, points) | Input: , where key is the index of cluster, points is the list | of the samples assigned to the same cluster | Output: , where value′ is a string of new cluster centers. | (1) num = 0; | (2) While (points.hasNext()){ | currentPoint = points.next(); | num++; | For (; < dimensions; ++){ | sum[]+ = currentPoint.point[]; | (3) } | (4) For (; < dimentsions; ++) | mean[] = sum[]/num; | (5) output pair; | (6) End |
|