recommenderlab
recommenderlab - Lab for Developing and Testing Recommender Algorithms - R package
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.9%) to scientific vocabulary
Keywords
collaborative-filtering
recommender-system
Last synced: 6 months ago
·
JSON representation
Repository
recommenderlab - Lab for Developing and Testing Recommender Algorithms - R package
Statistics
- Stars: 215
- Watchers: 14
- Forks: 61
- Open Issues: 7
- Releases: 11
Topics
collaborative-filtering
recommender-system
Created almost 10 years ago
· Last pushed 9 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r echo=FALSE, results = 'asis'}
pkg <- 'recommenderlab'
source("https://raw.githubusercontent.com/mhahsler/pkg_helpers/main/pkg_helpers.R")
pkg_title(pkg)
```
## Introduction
Provides a research infrastructure to develop and evaluate collaborative filtering recommender algorithms. This includes a sparse representation for user-item matrices, many popular algorithms, top-N recommendations, and cross-validation.
The package supports rating (e.g., 1-5 stars) and unary (0-1) data sets.
```{r echo=FALSE, results = 'asis'}
pkg_usage(pkg)
pkg_citation(pkg, 2)
```
## Supported algorithms
### Recommender algorithm
* User-based collaborative filtering (**UBCF**)
* Item-based collaborative filtering (**IBCF**)
* SVD with column-mean imputation (**SVD**)
* Funk SVD (**SVDF**)
* Alternating Least Squares (**ALS**)
* Matrix factorization with LIBMF (**LIBMF**)
* Association rule-based recommender (**AR**)
* Popular items (**POPULAR**)
* Randomly chosen items for comparison (**RANDOM**)
* Re-recommend liked items (**RERECOMMEND**)
* Hybrid recommendations (**HybridRecommender**)
### Recommender Evaluation
The framework supports given-n and all-but-x protocols with
* Train/test split
* Cross-validation
* Repeated bootstrap sampling
Available evaluation measures are
* Rating errors: MSE, RMSE, MAE
* Top-N recommendations: TPR/FPR (ROC), precision and recall
```{r echo=FALSE, results = 'asis'}
pkg_install(pkg)
```
## Usage
Load the package and prepare a dataset (included in the package). The MovieLense
data contains user ratings for movies on a 1 to 5 star scale.
We only use here users with more than 100 ratings.
```{r}
set.seed(1234)
library("recommenderlab")
data("MovieLense")
MovieLense100 <- MovieLense[rowCounts(MovieLense) > 100, ]
MovieLense100
```
Train a user-based collaborative filtering recommender using a small training set.
```{r}
train <- MovieLense100[1:300]
rec <- Recommender(train, method = "UBCF")
rec
```
Create top-N recommendations for new users (users 301 and 302).
```{r}
pre <- predict(rec, MovieLense100[301:302], n = 5)
pre
```
```{r}
as(pre, "list")
```
Use a 10-fold cross-validation scheme to compare the top-N lists of several algorithms.
Movies with 4 or more stars are considered a good recommendation.
We plot true negative vs. true positive rate for top-N lists of different lengths.
```{r TNR_vs_TPR}
scheme <- evaluationScheme(MovieLense100, method = "cross-validation", k = 10,
given = -5, goodRating = 4)
scheme
algorithms <- list(
"random items" = list(name = "RANDOM", param = NULL),
"popular items" = list(name = "POPULAR", param = NULL),
"user-based CF" = list(name = "UBCF", param = list(nn = 3)),
"item-based CF" = list(name = "IBCF", param = list(k = 100))
)
results <- evaluate(scheme, algorithms, type = "topNList",
n=c(1, 3, 5, 10), progress = FALSE)
plot(results, annotate = 2, legend = "topleft")
```
## Shiny App
A simple Shiny App running recommenderlab can be found at [https://mhahsler-apps.shinyapps.io/Jester/](https://mhahsler-apps.shinyapps.io/Jester/)
([source code](https://github.com/mhahsler/recommenderlab/tree/master/Work/apps)).
## References
* Michael Hahsler (2022) recommenderlab: An R framework for developing and testing recommendation algorithms. arXiv:2205.12371 [cs.IR]. DOI: [10.48550/arXiv.2205.12371](https://doi.org/10.48550/arXiv.2205.12371).
* recommenderlab [reference manual](https://CRAN.R-project.org/package=recommenderlab/recommenderlab.pdf)
* Suresh K. Gorakala and Michele Usuelli (2015) [Building a Recommendation System with R](https://www.amazon.com/Building-Recommendation-System-Suresh-Gorakala/dp/1783554495) (Packt Publishing) features the package recommenderlab.
Owner
- Name: Michael Hahsler
- Login: mhahsler
- Kind: user
- Location: Dallas, TX
- Company: SMU
- Website: http://michael.hahsler.net
- Repositories: 32
- Profile: https://github.com/mhahsler
I develop packages for AI, ML, and Data Science.
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 3
- Watch event: 2
- Issue comment event: 2
- Push event: 3
- Fork event: 1
Last Year
- Create event: 1
- Release event: 1
- Issues event: 3
- Watch event: 2
- Issue comment event: 2
- Push event: 3
- Fork event: 1
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Michael Hahsler | m****l@h****t | 168 |
| gregreich | g****h | 3 |
| Alex Ho | a****4@y****m | 2 |
| Yutaro Nishiyama | y****7@g****m | 1 |
| Paul Staab | p****b | 1 |
| Jon Calder | j****r@g****m | 1 |
| Higor Araújo dos Anjos | h****s@g****m | 1 |
| Guy Freeman | g****t@g****n | 1 |
Committer Domains (Top 20 + Academic)
gfrm.in: 1
hahsler.net: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 56
- Total pull requests: 13
- Average time to close issues: about 2 months
- Average time to close pull requests: about 2 months
- Total issue authors: 42
- Total pull request authors: 10
- Average comments per issue: 2.23
- Average comments per pull request: 2.08
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 0
- Average time to close issues: about 1 month
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 1.5
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- gregreich (4)
- aliko-str (3)
- DanielRauser (3)
- MounirHader (2)
- yckoong (2)
- aluxh (2)
- LynnMachineLearning0822 (2)
- KafeelBasha (2)
- jackyrx (2)
- celinexuclover (2)
- vgherard (1)
- meftasadat (1)
- NumbaCruncha (1)
- inkrement (1)
- Dikosh (1)
Pull Request Authors
- gregreich (3)
- aluxh (2)
- shuvayan (1)
- r0y0u (1)
- anjoshigor (1)
- chadyuu (1)
- jonmcalder (1)
- gfrmin (1)
- paulstaab (1)
- NivedhaB (1)
Top Labels
Issue Labels
bug (16)
enhancement (8)
question (8)
help wanted (4)
invalid (2)
unconfirmed (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 1,319 last-month
- Total docker downloads: 36,712
- Total dependent packages: 6
- Total dependent repositories: 13
- Total versions: 25
- Total maintainers: 1
cran.r-project.org: recommenderlab
Lab for Developing and Testing Recommender Algorithms
- Homepage: https://github.com/mhahsler/recommenderlab
- Documentation: http://cran.r-project.org/web/packages/recommenderlab/recommenderlab.pdf
- License: GPL-2
-
Latest release: 1.0.7
published 9 months ago
Rankings
Forks count: 1.1%
Stargazers count: 2.0%
Dependent packages count: 7.3%
Dependent repos count: 8.0%
Downloads: 8.7%
Average: 8.8%
Docker downloads count: 25.7%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- Matrix * depends
- R >= 3.5.0 depends
- arules * depends
- proxy >= 0.4 depends
- registry * depends
- irlba * imports
- matrixStats * imports
- methods * imports
- recosystem * imports
- stats * imports
- utils * imports
- testthat * suggests