Git Product home page Git Product logo

romar's Introduction

Romar

A Simple Recommendation Web Service

Build Status

Quick Start

下载、安装

下载地址: https://github.com/anjuke/romar/downloads

$ wget https://github.com/anjuke/romar/downloads/romar-core-1.0.0.tar.gz
$ tar xzf romar-core-1.0.0.tar.gz

下载测试数据

使用Movielens 1M数据,从 http://www.grouplens.org/node/12 下载并解压。然后将ratings.dat文件转换一下,参考如下命令。

$ awk -F '::' '{printf "%s,%s,%s\n", $1, $2, $3}' ratings.dat > romar.log.0

将生成的文件romar.log.0放入$ROMAR_HOME/data目录里。

启动

$ bin/start.sh

默认服务将监听8080端口处理http请求,修改端口请修改conf/romar.yaml

测试

然后执行

$ curl "http://localhost:8080/users/1/recommendations"

[ {"value":4.7291574, "item":3890}, {"value":4.692892, "item":3530}, {"value":4.662457, "item":989}, {"value":4.6365013, "item":127}, {"value":4.6365013, "item":3323} ]

如果看到类似上述返回信息,那么romar安装成功。

## API

详见: http://anjuke.github.com/romar/api/

## Config

 * **serverPort**  
   服务端口,缺省值`8080`

 * **recommendType**  
   允许`item`或`user`,表示Itembased或Userbased的协同过滤.

 * **itemSimilarityClass**  
   物品相似度算法。缺省值`TanimotoCoefficientSimilarity`

 * **userSimilarityClass**  
   用户相似度算法。缺省值`PearsonCorrelationSimilarity`

 * **userNeighborhoodClass**  
   相邻用户算法。缺省值`NearestNUserNeighborhood`

 * **userNeighborhoodNearestN**  
   缺省为`50`

 * **persistencePath**  
   持久化数据的存储路径,缺省为空表示不持久化

 * **allowUserStringID**, **allowItemStringID**  
   是否支持字符串形式的itemID或userID,缺省只允许整数形式的ID

具体查看`conf/romar.yaml`文件

## Build

    $ git clone [email protected]:anjuke/romar.git
    $ cd romar
    $ mvn

## Compute Item Similarity with HADOOP

    $ run bin/runHadoop.sh
默认使用Hadoop local方式执行<br/>
将core-site.xml hdfs-site.xml mapred-site.xml 放在conf/目录下即可提交任务到Hadoop集群执行


## Copyright & License

Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

*Copyright 2012 Anjuke Inc.*

romar's People

Contributors

erning avatar kdlan avatar pensz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

romar's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.