首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > K-Means算法 mapreduce

K-Means算法 mapreduce

  • 资源大小:25.55 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 算法 java 算法 mapreduce KMeans

资 源 简 介

public class KmeansMapper extends MapReduceBase implements   Mapper {  // one coodinate(data)  private List coordinate = new ArrayList();  private BasicKMeansTool basicKmeans = new BasicKMeansTool();  public void map(LongWritable key, Text value,    OutputCollector midoutput,    Reporter arg3) throws IOException {   // TODO Auto-generated method stub   String line = value.toString();   String[] dataList = line.split(",");   List distances = null;   StringTokenizer itr;   for (int i = 0; i < dataList.length; i++) {    itr = new StringTokenizer(dataList[i]);  &nbs

文 件 列 表

k-means_单机mapreduce
src
output
bin
1.txt
VIP VIP
0.170480s