Mahout 官方下载地址:http://apache.fayea.com/apache-mirror/mahout/

环境ubuntu 12.04, hadoop1.2.1 ,mahout 0.9 , memory 2G

1 首先解压tar包

tar -zxvf /mnt/hgfs/mnt/mahout-distribution-0.9.tar.gz -C /opt/hadoop/

2 添加环境变量

export HADOOP_HOME=/opt/hadoop/hadoop-1.2.
export HADOOP_CONF_DIR=${HADOOP_HOME}/conf
export MAHOUT_HOME=/opt/hadoop/mahout-distribution-0.9

你也可以将上面的新增环境变量加入~/.bashrc文件中去

3 启动你的hadoop服务,这里不再累述,自己参考:http://www.cnblogs.com/chenfool/p/3574789.html

4 执行一下mahout

cd /opt/hadoop/mahout-distribution-0.9
bin/mahout --help

报错,错误信息:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

使用vi 打开bin/mahout查看,搜索JAVA_HEAP_MAX=-X

看到它写死:JAVA_HEAP_MAX=-Xmx3g

尼玛啊,什么机器能轻松给3G的内存,改写成JAVA_HEAP_MAX=-Xmx1g

再查找一下mapred.map.child.java.opts 、 mapred.reduce.child.java.opts , 都写着4096m,还让渣渣机器活吗?

自己根据自己机器实际情况调整参数,保存退出。

再执行

bin/mahout --help

arff.vector: : Generate Vectors from an ARFF file or directory
baumwelch: : Baum-Welch algorithm for unsupervised HMM training
canopy: : Canopy clustering
cat: : Print a file or resource as the logistic regression models would see it
cleansvd: : Cleanup and verification of SVD output
clusterdump: : Dump cluster output to text
clusterpp: : Groups Clustering Output In Clusters
cmdump: : Dump confusion matrix in HTML or text formats
concatmatrices: : Concatenates 2 matrices of same cardinality into a single matrix
cvb: : LDA via Collapsed Variation Bayes (0th deriv. approx)
cvb0_local: : LDA via Collapsed Variation Bayes, in memory locally.
evaluateFactorization: : compute RMSE and MAE of a rating matrix factorization against probes
fkmeans: : Fuzzy K-means clustering
hmmpredict: : Generate random sequence of observations by given HMM
itemsimilarity: : Compute the item-item-similarities for item-based collaborative filtering
kmeans: : K-means clustering
lucene.vector: : Generate Vectors from a Lucene index
lucene2seq: : Generate Text SequenceFiles from a Lucene index
matrixdump: : Dump matrix in CSV format
matrixmult: : Take the product of two matrices
parallelALS: : ALS-WR factorization of a rating matrix
qualcluster: : Runs clustering experiments and summarizes results in a CSV
recommendfactorized: : Compute recommendations using the factorization of a rating matrix
recommenditembased: : Compute recommendations using item-based collaborative filtering
regexconverter: : Convert text files on a per line basis based on regular expressions
resplit: : Splits a set of SequenceFiles into a number of equal splits
rowid: : Map SequenceFile<Text,VectorWritable> to {SequenceFile<IntWritable,VectorWritable>, SequenceFile<IntWritable,Text>}
rowsimilarity: : Compute the pairwise similarities of the rows of a matrix
runAdaptiveLogistic: : Score new production data using a probably trained and validated AdaptivelogisticRegression model
runlogistic: : Run a logistic regression model against CSV data
seq2encoded: : Encoded Sparse Vector generation from Text sequence files
seq2sparse: : Sparse Vector generation from Text sequence files
seqdirectory: : Generate sequence files (of Text) from a directory
seqdumper: : Generic Sequence File dumper
seqmailarchives: : Creates SequenceFile from a directory containing gzipped mail archives
seqwiki: : Wikipedia xml dump to sequence file
spectralkmeans: : Spectral k-means clustering
split: : Split Input data into test and train sets
splitDataset: : split a rating dataset into training and probe parts
ssvd: : Stochastic SVD
streamingkmeans: : Streaming k-means clustering
svd: : Lanczos Singular Value Decomposition
testnb: : Test the Vector-based Bayes classifier
trainAdaptiveLogistic: : Train an AdaptivelogisticRegression model
trainlogistic: : Train a logistic regression using stochastic gradient descent
trainnb: : Train the Vector-based Bayes classifier
transpose: : Take the transpose of a matrix
validateAdaptiveLogistic: : Validate an AdaptivelogisticRegression model against hold-out data set
vecdist: : Compute the distances between a set of Vectors (or Cluster or Canopy, they must fit in memory) and a list of Vectors
vectordump: : Dump vectors from a sequence file to text
viterbi: : Viterbi decoding of hidden states from given output states sequence

证明mahout 环境部署成功了。

参考文章:

http://blog.sina.com.cn/s/blog_916b71bb0101jq44.html

http://samchu.logdown.com/posts/192574-mahout-09-installation-verification-records

学习Mahout(一)的更多相关文章

  1. 零基础学习Mahout之-----搭建单机环境

    一.Mahout是什么? Mahout是Apache的一个开源项目(http://mahout.apache.org/),提供了机器学习领域的若干经典算法,以便开发人员快速构建机器学习和数据挖掘方面的 ...

  2. 学习Mahout (四)

    在Mahout 学习(三)中,我贴了example的代码,里面生成向量文件的代码: InputDriver.runJob(input, directoryContainingConvertedInpu ...

  3. 学习Mahout(三)

    开发+运行第一个Mahout的程序 代码: /** * Licensed to the Apache Software Foundation (ASF) under one or more * con ...

  4. 学习Mahout(二)

    继续上一篇博客. 这篇博客介绍如何跑一下mahout自带的Hello world程序 我将mahout 安装在/opt/hadoop/mahout-distribution-0.9 cd /opt/h ...

  5. mahout分类学习和遇到的问题总结

    这段时间学习Mahout有喜有悲.在这里首先感谢樊哲老师的指导.以下列出关于这次Mahout分类的学习和遇到的问题,还请大家多多提出建议:(全部文件操作都使用是在hdfs上边进行的). (本人用的环境 ...

  6. mahout中kmeans算法和Canopy算法实现原理

    本文讲一下mahout中kmeans算法和Canopy算法实现原理. 一. Kmeans是一个很经典的聚类算法,我想大家都非常熟悉.虽然算法较为简单,在实际应用中却可以有不错的效果:其算法原理也决定了 ...

  7. Mahout机器学习平台之聚类算法具体剖析(含实例分析)

    第一部分: 学习Mahout必需要知道的资料查找技能: 学会查官方帮助文档: 解压用于安装文件(mahout-distribution-0.6.tar.gz),找到例如以下位置.我将该文件解压到win ...

  8. hadoop学习路线

    学习hadoop,首先我们要知道hadoop是什么? 说到底Hadoop只是一项分布式系统的工具,我们在学习的时候要理解分布式系统设计中的原则以及方法,只有这样才能以不变应万变.再一个就是一定要动手, ...

  9. 《mahout实战》

    <mahout实战> 基本信息 原书名:Mahout in action 作者: (美)Sean Owen    Robin Anil    Ted Dunning    Ellen Fr ...

随机推荐

  1. android 内部文件读取

    Android 文件管理方法 Android使用的是基于Linux的文件系统,对于文件的訪问和管理是通过权限设置来限制的. 在Linux系统中,文件权限分别描写叙述了创建者.同组用户和其它用户对文件的 ...

  2. Java集合框架:Arrays工具类

    java.util.Arrays类能方便地操作数组,它提供的方法都是静态的.整个Arrays工具类的实现有3000+行.可是归纳总结一下可知它有下面功能(9个): 1. asList 定义: @Saf ...

  3. Centos-tomcat-安装配置apr

    [root@zyzzw_jk tools]# tar -zxvf apr-1.5.2.tar.gz[root@zyzzw_jk tools]# tar -zxvf apr-util-1.5.4.tar ...

  4. mysql有哪几种索引

    从数据结构角度 1.  B+树索引(O(log(n))) 2.  hash索引 3.  FULLTEXT索引 4.  R-Tree索引 从物理存储角度 1. 聚集索引 2.  非聚集索引 从逻辑角度 ...

  5. ActionFilterAttribute之HtmlFilter,压缩HTML代码

    当开启这个过滤器后,最终生成的HTML代码将会被压缩一下,在流量很大的网站中,能减少带宽成本就减少一点,何乐而不为? [csharp] view plaincopy using System; usi ...

  6. Appium基于安卓的各种FindElement的控件定位

    转自:http://www.2cto.com/kf/201410/340345.html 1. findElementByName 1.1 示例 ? 1 2 el = driver.findEleme ...

  7. HDU 4085 Peach Blossom Spring 斯坦纳树 状态压缩DP+SPFA

    状态压缩dp+spfa解斯坦纳树 枚举子树的形态 dp[i][j] = min(dp[i][j], dp[i][k]+dp[i][l]) 当中k和l是对j的一个划分 依照边进行松弛 dp[i][j]  ...

  8. LiberOJ #6210. 「美团 CodeM 决赛」tree 树形DP

    题目链接:点这里 题解: 需要证明,所求的路径一定是全部权值都为1或者,路径上权值至多有一个为2其余为1且权值2在路径中央. 然后树形DP 设定dp[i][0/1] 以1为根的情况下,以i 节点下子树 ...

  9. mysql 查询表死锁 和结束死锁的表步骤以及锁表等级

    1.查询是否锁表show OPEN TABLES where In_use > 0; 2.查询进程 show processlist  查询到相对应的进程===然后 kill    id 补充: ...

  10. BootLoader与Linux内核的参数传递【转】

    本文转载自:http://blog.sina.com.cn/s/blog_476d8cf30100rttx.html 在嵌入式系统中,BootLoader 是用来初始化硬件,加载内核,传递参数.因为嵌 ...