Skip to content

fansy1990/fast_cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

---------------------------------------------------


运行说明:(linux操作默认使用root用户)
1. 拷贝Jfreechar的相关包:jfreechar-1.0.15.jar , jcommon-1.0.17.jar 到$HADOOP_HOME/share/hadoop/mapreduce

2. 拷贝 digit_recoginzation_train_small.csv 到hdfs的/user/root/digit.csv文件
   hadoop fs -put /opt/digit_recoginzation_train_small.csv /user/root/digit.csv

3. 云平台MR任务 

3.0 把src/main/java目录的源码export到 fast_cluster.jar文件

3.1. 转换为序列化文件
hadoop jar /opt/fast_cluster.jar fz.fast_cluster.ToSeqJob digit_train.csv seq_out ,
输出有5975条记录
3.2. 计算距离
hadoop jar /opt/fast_cluster.jar fz.fast_cluster.CalDistanceJob seq_out cal_distance_out 
输出有17847325条记录  17847325 = 5975*(5975-1)/2

3.3. 根据距离求解阈值,并根据阈值画决策图
hadoop jar /opt/fast_cluster.jar fz.fast_cluster.CalDiffDCFindVec cal_distance_out/part-r-00000 17847325 0.02 0.02 1 2 2 /opt/picandlog 500
输出5570条记录

3.4. 根据距离和密度阈值求得聚类中心并写入本地
hadoop jar /opt/fast_cluster.jar fz.fast_cluster.FindWriteCenter /opt/picandlog/log_center_0.dat 500 1000 digit_train.csv center_out /opt/picandlog/center.dat


4. 根据聚类中心对每个数据进行分类
   未完成!





About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages