`
beneo
  • 浏览: 54393 次
  • 性别: Icon_minigender_1
  • 来自: 希伯來
社区版块
存档分类
最新评论

mahout vector 的产生方式

阅读更多
根据wiki

mahout 产生 vector 的方式有2种:

#1 from lucene index to vector
$MAHOUT_HOME/bin/mahout lucene.vector <PATH TO DIRECTORY CONTAINING LUCENE INDEX> \
   --output <PATH TO OUTPUT LOCATION> --field <NAME OF FIELD IN INDEX> --dictOut <PATH TO FILE TO OUTPUT THE DICTIONARY TO] \
   <--max <Number of vectors to output>> <--norm {INF|integer >= 0}> <--idField <Name of the idField in the Lucene index>>


#2 from sequencefile to vector
$MAHOUT_HOME/bin/mahout seq2sparse \
-i <PATH TO THE SEQUENCEFILES> -o <OUTPUT DIRECTORY WHERE VECTORS AND DICTIONARY IS GENERATED> \
<-wt <WEIGHTING METHOD USED> {tf|tfidf}> \
<-chunk <MAX SIZE OF DICTIONARY CHUNK IN MB TO KEEP IN MEMORY> 100> \
<-a <NAME OF THE LUCENE ANALYZER TO TOKENIZE THE DOCUMENT> org.apache.lucene.analysis.standard.StandardAnalyzer> \
<--minSupport <MINIMUM SUPPORT> 2> \
<--minDF <MINIMUM DOCUMENT FREQUENCY> 1> \
<--maxDFPercent <MAX PERCENTAGE OF DOCS FOR DF. VALUE BETWEEN 0-100> 99> \
<--norm <REFER TO L_2 NORM ABOVE>{INF|integer >= 0}>"
<-seq <Create SequentialAccessVectors>{false|true required for running some algorithms(LDA,Lanczos)}>"


结果发现第二种也是要借助lucene的分词,也有设置“MAX SIZE OF DICTIONARY CHUNK IN MB TO KEEP IN MEMORY”,这个也是lucene里面设置的参数。

阿哈,那这样看来,无论哪种vector的生成方式,其实原理都是一样的,用lucene的index文件做文章,只不过第二种方式少了lucene index -> vector 的方式。


分享到:
评论

相关推荐

    mahout api 学习资料

    mahout_help,mahout的java api帮助文档,可以帮你更轻松掌握mahout

    maven_mahout_template-mahout-0.8

    maven_mahout_template-mahout-0.8

    MAHOUT实战(中文版)

    MAHOUT实战 MAHOUT IN ACTION

    mahout-0.11.1 相关的jar

    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 ...

    mahout Algorithms源码分析

    mahoutAlgorithms源码分析 mahout代码解析

    mahout-integration-0.7

    mahout-integration-0.7mahout-integration-0.7mahout-integration-0.7mahout-integration-0.7

    Learning.Apache.Mahout.1783555211

    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-core-0.9.jar+mahout-core-0.8.jar+mahout-core-0.1.jar

    mahout贝叶斯算法拓展

    mahout中的贝叶斯算法的拓展开发包,提供了相关接口可以供用户调用,直接即可跑出结果,相关运行方式参考blog《mahout贝叶斯算法开发思路(拓展篇)》

    Mahout tutorial

    Mahout 官方文档,简单介绍Mahout概念及其安装和简单使用

    Mahout0.8_API

    Mahout0.8_API 喜欢的人就请下载吧

    Mahout in Action

    1 ■ Meet Apache Mahout 1 PART 1 RECOMMENDATIONS ...................................................11 2 ■ Introducing recommenders 13 3 ■ Representing recommender data 26 4 ■ Making ...

    spring-mahout-demo

    spring-mahout-demo-----一个简单的spring-mahout结合的例子,是很好的学习开发思路的例子。

    mahout所需jar包

    Mahout支持K-Means等聚类算法,在此zip包中已经有打好jar包的资源,不需要用户再打jar包,可以直接使用。

    mahout源码

    mahout,朴素贝叶斯分类,中文分词,mahout,朴素贝叶斯分类,中文分词,

    mahout 简介,中文

    mahout 入门中文材料,是IBM文章汇总,值得一看

    Apache Mahout 简介

    Apache Mahout 简介

    Mahout源码

    Mahout是一个Java的机器学习库。Mahout的完整源代码,基于maven,可以轻易导入工程中

    基于mahout的数据挖掘技术课程 共35页.pdf

    • 1、什么是mahout? • 2、mahout是干啥的 ? • 3、mahout是怎么干的? Apache Mahout 是 Apache Software Foundation (ASF) 开发的一个全新的开源项目,其主要目标是创建一些可伸缩的机器学习算法,供开发人员...

    Mahout案例实战 约会推荐

    Mahout实战案例-约会推荐系统,详情参考博客《Mahout案例实战--Dating Recommender 系统》http://blog.csdn.net/fansy1990/article/details/44181459

Global site tag (gtag.js) - Google Analytics