1.下载Mahout
http://www.apache.org/dist//mahout/0.4/
2.解压
tar zxvf mahout-distribution-0.4.tar.gz
3.算法列表
./bin/mahout -h
显示出当前mahout支持的所有算法
聚类Clustering
Clustering of synthetic control data
Pre-Prep
1)下载输入数据,点
这里
由60行60列组成
_time | _time+x | _time+2x | .. | _time+60x |
28.7812 | 34.4632 | 31.3381 | .. | 31.2834 |
24.8923 | 25.741 | 27.5532 | .. | 32.8217 |
..
..
35.5351 | 41.7067 | 39.1705 | 48.3964 | .. | 38.6103 |
24.2104 | 41.7679 | 45.2228 | 43.7762 | .. | 48.8175 |
..
..
2)启动hadoop
$HADOOP_HOME/bin/start-all.sh
3)将数据上传到hadoop
$HADOOP_HOME/bin/hadoop fs -mkdir testdata
$HADOOP_HOME/bin/hadoop fs -put <PATH TO synthetic_control.data> testdata
创建测试目录testdata,并把数据导入到这个tastdata目录中(这里的目录的名字只能是testdata)
Perform Clustering
a.For canopy :
$MAHOUT_HOME/bin/mahout org.apache.mahout.clustering.syntheticcontrol.canopy.Job
b.For kmeans :
$MAHOUT_HOME/bin/mahout org.apache.mahout.clustering.syntheticcontrol.kmeans.Job
c.For fuzzykmeans :
$MAHOUT_HOME/bin/mahout org.apache.mahout.clustering.syntheticcontrol.fuzzykmeans.Job
d.For dirichlet :
$MAHOUT_HOME/bin/mahout org.apache.mahout.clustering.syntheticcontrol.dirichlet.Job
e.For meanshift :
$MAHOUT_HOME/bin/mahout org.apache.mahout.clustering.syntheticcontrol.meanshift.Job
也可以直接在hadoop环境下运行
hadoop jar mahout-examples-0.4-job.jar org.apache.mahout.clustering.syntheticcontrol.kmeans.Job
Read / Analyze Output
1)查看所有输出文件
hadoop fs -lsr output
2)下载到本地
hadoop fs -get output $MAHOUT_HOME/examples
转入output目录下,
$cd MAHOUT_HOME/examples/output
$ls
如果看到以下结果,那么算法运行成功,你的安装也就成功了:
clusteredPoints clusters-1 clusters-2 clusters-4 clusters-6 clusters-8 data
clusters-0 clusters-10 clusters-3 clusters-5 clusters-7 clusters-9
3)单个的集群结果在output/clusters-i
4)所有集群汇总结果在output/clusteredPoints
结果是sequence格式的。如果直接在hdfs上查看,使用
./bin/mahout vectordump --seqFile output/data/part-m-00000
分享到:
相关推荐
本数据包包含synthetic_control Australian Sign Language trace gait-data 数据,每一包含一训练和测试样本集 供分类、聚类等应用
Our clustering algorithm is tested on some well-known data sets from UCI and on some synthetic data. The experiment results show that our method outperforms the global K-means algorithm.And then, a ...
ts_cluster 使用 R 的时间序列聚类 这个 repo 只是一个示例 repo,用于学习如何对时间序列数据进行聚类。... 我们使用的数据是来自 UCI 的 Synthetic Control Chart Time Series,更多详细信息您可以访问
花授粉算法matlab代码分区聚类 使用流行的元启发式算法在聚类过程中找到最佳聚类中心 基于和谐搜索的聚类算法 - This set of files perform Harmony search based clustering algorithm. - The proposed novel ...
Mahout的kmeans聚类测试数据
Experimental results carried on synthetic data set and data set based on actual background illustrate the performance of the new validity function and the corresponding fuzzy clustering algorithm. ...
结合Nystrm采样技术和图谱理论,提出了一种改进的SAR图像高效快速谱聚类新算法。该算法引入矩阵扰动分析理论,构造适用于SAR图像的自动确定类数准则;在分析比例参数对谱聚类算法影响的基础上,依据SAR图像的整体...
由于不同领域的专家提供的成对约束可能彼此冲突,因此进行了许多研究工作,以评估施加在半监督聚类上的噪声的影响。 在本文中,我们介绍了精英成对约束,包括精英必须链接(EML)和精英不能链接(ECL)约束。 与...
在研究合成景观或中性景观时,尝试使用不同的随机化和聚类算法很有趣。 此处包含的内容是同一实验的一部分。 通常在输出之前带有标题,以便可以在GIS软件(例如ArcMap)中轻松读取ASCII文件。 输出文件为ASCII类型,...
针对合成孔径雷达图像中存在椒盐噪声影响变化检测精度的问题,在变化检测步骤中应用一种改进的直觉模糊C核均值聚类算法;首先运用代数运算方法——差值法、比值法、图像回归法,构建3幅光谱变化差异的图像,将3幅差异...
本文提出了一种新的无监督显着性合成Kong径雷达(SAR... 最后,采用k均值聚类来获得所提取特征的变化图,将其聚类为两类:变化区域和不变区域。 在五个真实和两个模拟SAR图像数据集上的实验结果证明了该方法的有效性。
基于四分量散射模型提出了一种多极化SAR(synthetic aperture radar)图像非监督分类算法。与Freeman三分量散射模型不同,四分量散射模型在Freeman三分量的基础上增加了螺旋散射分量(helix),该分量反映了复杂地貌...
选择SMOTE(synthetic minority over-sampling technique)过抽样方法对数据集进行预处理,并充分利用特征匹配高准确性的优点识别和分拣出SSL 加密流,进而利用基于互信息最大化的聚类方法和SVM分类方法进一步识别...
采集了自然场景下黄色诱虫板的图像,利用超像素分割算法和多DBSCAN聚类图像融合的方法对采集的图像进行区域分割,保证了目标区域的准确性和完整性。在此基础上,提取了目标图像子区域的L、a、b均值和标准差特征,构建了...