1. mahout seqdirectory
$ mahout seqdirectory --input (-i) input Path to job input directory(原始文本文件). --output (-o) output The directory pathname for output.(<Text,Text>Sequence File) -ow
功能: 将原始文本数据集转换为< Text, Text > SequenceFile
2. mahout seq2sparke
功能: Convert and preprocesses the dataset(<Text,Text> SequenceFile) into a < Text, VectorWritable > SequenceFile containing term frequencies for each document.
即根据Sequence File转换为tfidf向量文件
说明:If we wanted to use different parsing methods or transformations on the term frequency vectors we could supply different options here e.g.: -ng 2 for bigrams or -n 2 for L2 length normalization
mahout seq2sparse --output (-o) output The directory pathname for output. --input (-i) input Path to job input directory. --weight (-wt) weight The kind of weight to use. Currently TF or TFIDF. Default: TFIDF --norm (-n) norm The norm to use, expressed as either a float or "INF" if you want to use the Infinite norm. Must be greater or equal to 0. The default is not to normalize --overwrite (-ow) If set, overwrite the output directory --sequentialAccessVector (-seq) (Optional) Whether output vectors should be SequentialAccessVectors. If set true else false --namedVector (-nv) (Optional) Whether output vectors should be NamedVectors. If set true else false
-i Sequence File文件目录
-o 向量文件输出目录
-wt 权重类型,支持TF或者TFIDF两种选项,默认TFIDF
-n 使用的正规化,使用浮点数或者"INF"表示,
-ow 指定该参数,将覆盖已有的输出目录
-seq 指定该参数,那么输出的向量是SequentialAccessVectors
-nv 指定该参数,那么输出的向量是NamedVectors
3. mahout split
功能:Split the preprocessed dataset into training and testing sets.
将预处理的tfidf向量集转换为training和testing向量集
$ mahout split -i ${WORK_DIR}/20news-vectors/tfidf-vectors --trainingOutput ${WORK_DIR}/20news-train-vectors --testOutput ${WORK_DIR}/20news-test-vectors --randomSelectionPct 40 --overwrite --sequenceFiles -xm sequential
说明:如上是将向量数据集分为训练数据和检测数据,以随机40-60拆分
3. mahout trainnb
功能:训练分类器
mahout trainnb --input (-i) input Path to job input directory. --output (-o) output The directory pathname for output. --alphaI (-a) alphaI Smoothing parameter. Default is 1.0 --trainComplementary (-c) Train complementary? Default is false. --labelIndex (-li) labelIndex The path to store the label index in --overwrite (-ow) If present, overwrite the output directory before running job --help (-h) Print out help --tempDir tempDir Intermediate output directory --startPhase startPhase First phase to run --endPhase endPhase Last phase to run
-i 输入路径
-o 输出路径
-a
-c 补偿性训练
-li label index文件的目录
-ow 指定该参数,删除输出目录
tempDir MapReduce作业的中间结果
startPhase 运行的第一个阶段
endPhase 运行的最后一个阶段
4. mahout testnb
功能:检验Bayes分类器
mahout testnb --input (-i) input Path to job input directory. --output (-o) output The directory pathname for output. --overwrite (-ow) If present, overwrite the output directory before running job --model (-m) model The path to the model built during training --testComplementary (-c) Test complementary? Default is false. --runSequential (-seq) Run sequential? --labelIndex (-l) labelIndex The path to the location of the label index --help (-h) Print out help --tempDir tempDir Intermediate output directory --startPhase startPhase First phase to run --endPhase endPhase Last phase to run
-i 输入路径
-o 输出路径
-ow 覆盖输出目录
-c
相关推荐
基于用户的简单推荐 保证可以运行 用到了mahout的相关算法
该资源是在Eclipse平台里,使用Mahout库的API,实现基于用户的协同过滤算法,从而进行商品推荐。 软件环境是:win7 64位 +Eclipse4.4 + jdk1.6, 用到了7个.jar包, 分别为:commons-logging-1.2.jar, commons-...
MovieRecommender基于Mahout实现协同过滤推荐算法的电影推荐系统^
基于Mahout的电影推荐系统的数据文件,数据文件包含(users.dat、moives.dat、ratings.dat、movie_preferences.txt)。
选择不同的用户相似度度量方法,这里选择了基于谷本系数、基于对数似然和基于曼哈顿距离 基于内容的推荐 对新闻文本进行分词 调用Deeplearning4j中构建paragraphvector的方法,通过doc2vec构建VSM 用Gensim会更方便...
基于Mahout实现协同过滤推荐算法的电影推荐系统
Apache Mahout 是 Apache Software Foundation (ASF) 开发的一个全新的开源项目,其主要目标是创建一些可伸缩的机器学习算法,供开发人员在 Apache 在许可下免费使用。 机器学习 • 机器学习是人工智能的一个分支,...
这是这篇博文的工程代码,是MyEclipse的工程文件。...由于原工程开发的时候是在MyEclipse中引用mahout的jar包,所以这个压缩文件并没有相关的jar文件,故运行此项目之前需要做的事请,是需要导入mahout的开发包。
基于Java+Mahout的协同过滤推荐算法图书推荐系统源码+项目说明.zip 基于协同过滤的书籍推荐系统,图书推荐系统 最新版本,在原先手动计算皮尔逊相似度和评分矩阵的基础上添加了Mahout实现的协同过滤推荐算法。 ...
maven_mahout_template-mahout-0.8
Mahout是一个Java的机器学习库。Mahout的完整源代码,基于maven,可以轻易导入工程中
mahout_help,mahout的java api帮助文档,可以帮你更轻松掌握mahout
mahout-examples-0.11.1 mahout-examples-0.11.1-job mahout-h2o_2.10-0.11.1 mahout-h2o_2.10-0.11.1-dependency-reduced mahout-hdfs-0.11.1 mahout-integration-0.11.1 mahout-math-0.11.1 mahout-math-0.11.1 ...
If you are a Java developer and want to use Mahout and Machine Learning to solve Big Data analytics use-cases then this book is for you. Familiarity with shell-scripts is assumed but no prior ...
mahout-core-0.9.jar+mahout-core-0.8.jar+mahout-core-0.1.jar
MAHOUT实战 MAHOUT IN ACTION