run apache mahout examples
官方網站上面有個有個說明,
Recommender Documentation - Apache Mahout - Apache Software Foundation
https://cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation
To build and run the demo, follow the instructions below, which are written for Unix-like operating systems:
- Obtain a copy of the Mahout distribution, either from SVN or as a downloaded archive.
- Download the "1 Million MovieLens Dataset" from Grouplens.org
- Unpack the archive and copy movies.dat and ratings.dat to trunk/integration/src/main/resources/org/apache/mahout/cf/taste/example/grouplens under the Mahout distribution directory.
- Navigate to the directory where you unpacked the Mahout distribution, and navigate to trunk.
- Run mvn -DskipTests install, which builds and installs Mahout core to your local repository
- cd integration
- You may need to give Maven more memory: in a bash shell, export MAVEN_OPTS=-Xmx1024M
- mvn jetty:run.
- Get recommendations by accessing the web application in your browser: http://localhost:8080/mahout-integration/RecommenderServlet?userID=1 This will produce a simple preference-item ID list which could be consumed by a client application. Get more useful human-readable output with the debug parameter: http://localhost:8080/mahout-integration/RecommenderServlet?userID=1&debug=true
遇到了一些問題
HTTP ERROR: 503
SERVICE_UNAVAILABLE
RequestURI=/mahout-integration/RecommenderServlet
Powered by jetty://
:~/code/mahout-distribution-0.7/integration$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Integration
[INFO] task-segment: [jetty:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [jetty:run {execution: default-cli}]
[INFO] Configuring Jetty for project: Mahout Integration
[INFO] Webapp source directory = /home/peicheng/code/mahout-distribution-0.7/integration/src/main/webapp
[INFO] web.xml file = /home/peicheng/code/mahout-distribution-0.7/integration/src/main/webapp/WEB-INF/web.xml
[INFO] Classes = /home/peicheng/code/mahout-distribution-0.7/integration/target/classes
2012-10-26 14:58:11.752::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Context path = /mahout-integration
[INFO] Tmp directory = determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] Webapp directory = /home/peicheng/code/mahout-distribution-0.7/integration/src/main/webapp
[INFO] Starting jetty 6.1.10 ...
2012-10-26 14:58:11.829::INFO: jetty-6.1.10
2012-10-26 14:58:12.973::INFO: No Transaction manager found - if your webapp requires one, please configure one.
2012-10-26 14:58:12.400::WARN: failed taste-recommender
javax.servlet.ServletException: java.lang.IllegalStateException: java.lang.ClassNotFoundException: org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender
在pom.xml內加入
Problem running grouplens example
http://www.digipedia.pl/usenet/thread/10949/13891/
general - Re: Problem running grouplens example - msg#06145 - Recent Discussion OSDir.com
http://osdir.com/ml/general/2012-08/msg06145.html
留言列表