Apache Mahout 是 Apache Software Foundation(ASF) 旗下的一个开源项目,提供一些可扩展的机器学习领域经典算法的实现,旨在帮助开发人员更加方便快捷地创建智能应用程序。经典算法包括聚类、分类、协同过滤、进化编程等等,并且,在 Mahout还支持在Hadoop集群中运行,使这些算法可以更高效的运行在云计算环境中。
目前Mahout已经发布的最高版本是0.5。在这里https://cwiki.apache.org/confluence/display/MAHOUT/BuildingMahout可以找到Mahout的下载路径,可以下载0.5版本的源码压缩包,也可以从svn中co主干代码。但是主干代码0.6-SNAPSHOT中没有找到taste-webapp相关代码。
后面的介绍都是以0.5版本的源代码包为基础做的介绍。
1.下载代码后,解压。然后命令行进入mahout-distribution-0.5目录执行
mvn -DskipTests install
将mahout相关模块进行编译,并安装到本地maven仓库中
如果出现内存溢出,可以先调大JVM的堆内存大小
export MAVEN_OPTS=-Xmx1024m
2.生成eclipse工程,本步骤可选,但是建议进行。因为在eclipse中修改java工程代码比较方便。还是在mahout-distribution-0.5目录执行以下命令
mvn eclipse:eclipse
3.如果执行了第2步,请继续执行此步骤。在eclipse中导入mahout-distribution-0.5下的所有工程,这个就不详细介绍了。
4.修改mahout-taste-webapp工程的pom.xml,添加对mahout-examples的依赖
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mahout-examples</artifactId>
<version>0.5</version>
</dependency>
5.在mahout-taste-webapp工程的recommender.properties中添加
recommender.class=org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender
6.从http://www.grouplens.org/node/73上下载数据文件,我下载的是1M Ratings Data Set (.tar.gz)经过测试验证通过,其他数据文件请自行验证。解压以后将ratings.dat复制到mahout-taste-webapp工程的/org/apache/mahout/cf/taste/example/grouplens/下,至于为什么是这个路径?请大家去看这个类GroupLensDataModel。
7.现在准备工作基本完成了,cd到taste-web我们来运行一把
mvn jetty:run-war
8.访问一下http://localhost:8080/RecommenderServlet?userID=1就能看到效果,这个servlet还支持其他参数请参看RecommenderServlet的javadoc说明
现在可以开始Mahout的机器学习之旅了。
分享到:
相关推荐
教你成功运行mahout的taste webapp例子,网上的很多资料说的不清楚,或者版本冲突。正确的版本是jdk1.6 maven3.0.5 mahout0.5 。 摸索良久,亲测有效!
This book is a practical guide that explains the classification algorithms provided in Apache Mahout with the help of actual examples. Starting with the introduction of classification and model ...
Apache Mahout: Beyond MapReduce. Distributed algorithm design This book is about designing mathematical and Machine Learning algorithms using the Apache Mahout "Samsara" platform. The material takes...
Thank you for requesting the download for Apache Mahout Cookbook. Please click the following link to download the code:
Apache Mahout is a scalable machine learning library with algorithms for clustering, classification, and recommendations. It empowers users to analyze patterns in large, diverse, and complex datasets ...
Apache Mahout 简介
Apache Mahout Cookbook
深入解析Apache Mahout的书籍
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 ...
基于Apache Mahout框架实现的具有协同过滤功能的推荐系统源码+数据+项目操作说明.zip 该项目是使用Apache Mahout框架创建的具有协同过滤功能的推荐系统。该系统使用一个音乐推荐数据集作为研究目的的输入,但可以...
有关Mahout的其他信息,请访问设置环境无论您是使用Mahoutshell,运行命令行作业还是将其用作构建应用程序的库,您都需要设置几个环境变量。 对于Mac,在~/.bash_profile编辑环境;对于许多Linux发行版,在~/....
直接翻译自java版的协同过滤推荐引擎 apache mahout taste。支持在java最新版0.9中移除的Slope One、TreeClustering demo: string filePath = @"E:\WorkStudio\ntaste\ntaste.Test\datafile\item.csv"; var model = ...
具体步骤,参见博客:http://blog.csdn.net/fufengrui/article/details/17022535
Learning Apache Mahout Classification-Packt Publishing(2015) 高清完整中文版PDF下载
Apache Mahout is one of the first and most prominent Big Data machine learning platforms. It implements machine learning algorithms on top of distributed processing platforms such as Hadoop and Spark...
Learning Apache Mahout Classification (2015),Packt Publishing, EPUB格式
Apache mahout说明性文档,全面介绍mahout安装及其使用
mahout之taste介绍,给公司同事做报告时准备的ppt,希望有用
玩游戏 一个运行Apache Mahout方法的游乐场。
mahout是用来做大数据推荐系统和机器学习使用的框架,这个工具包官网下载非常慢,下载了一夜终于下载到了,刚好够上传的