Coder Social home page Coder Social logo

jwijffels / myrrix-r-interface Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 6.0 33.35 MB

Let R talk to Myrrix. Myrrix is a complete, real-time, scalable clustering and recommender system, evolved from Apache Mahout.

Shell 0.73% R 47.43% Batchfile 0.66% HTML 51.18%

myrrix-r-interface's Introduction

Myrrix-R-interface

Let R talk to Myrrix. Myrrix is a complete, real-time, scalable clustering and recommender system, evolved from Apache Mahout.

For more information about Myrrix, go to the Myrrix website: http://myrrix.com.

The R packages allow to build recommendation engines using Myrrix and interact with it. An example is shown below.

Install Myrrixjars and Myrrix

To start up building recommendation engines, install the R packages Myrrixjars and Myrrix as follows.

library(devtools)
install.packages("rJava")
install.packages("ffbase")
install_github("Myrrix-R-interface", "jwijffels", subdir="/Myrrixjars/pkg")
install_github("Myrrix-R-interface", "jwijffels", subdir="/Myrrix/pkg")

Running Myrrix

The following example shows the basic usage on how to use Myrrix to build a local recommendation engine. It uses the audioscrobbler data available on the Myrrix website.

library(Myrrix)

## Download example dataset
inputfile <- file.path(tempdir(), "audioscrobbler-data.subset.csv.gz")
download.file(url="http://dom2bevkhhre1.cloudfront.net/audioscrobbler-data.subset.csv.gz", destfile = inputfile)

## Set hyperparameters
setMyrrixHyperParameters(params=list(model.iterations.max = 2, model.features=10, model.als.lambda=0.1))
x <- getMyrrixHyperParameters(parameters=c("model.iterations.max","model.features","model.als.lambda"))
str(x)

## Build a model which will be stored in getwd() and ingest the data file into it
recommendationengine <- new("ServerRecommender", localInputDir=getwd())
ingest(recommendationengine, inputfile)
await(recommendationengine)

## Get all users/items and score alongside the recommendation model
items <- getAllItemIDs(recommendationengine)
users <- getAllUserIDs(recommendationengine)
estimatePreference(recommendationengine, userID=users[1], itemIDs=items[1:20])
estimatePreference(recommendationengine, userID=users[10], itemIDs=items)
mostPopularItems(recommendationengine, howMany=10L)
recommend(recommendationengine, userID=users[5], howMany=10L)

myrrix-r-interface's People

Contributors

jwijffels avatar

Stargazers

Xiangyun Huang avatar Leo Lee avatar Srikanth K S avatar James Chang avatar Vishal Belsare avatar  avatar Mohamed Eldesouki avatar Neil Halelamien avatar Li Bin avatar Yueping Qian avatar Sam Bessalah avatar

Watchers

James Cloos avatar  avatar James Chang avatar Srikanth K S avatar

myrrix-r-interface'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.