GithubHelp home page GithubHelp logo

ludovikcoba / rrecsys Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 11.0 1.92 MB

rrecsys: Environment for Assessing Recommender Systems

Home Page: https://cran.r-project.org/package=rrecsys

R 71.75% C++ 28.25%

rrecsys's Issues

Out-of-Sample Prediction

Hi,

is there a possibility to run an out-of-sample prediction in rrecsys?
In the way I understood the package, only previously trained data can be used for prediction. For my purposes, I need to create a model on a training data set and predict values for a test data set.
In other packages this is easily possible but in rrecsys I haven't found a way to do so yet.

Error in V[j, ] <- V[j, ] + lambda * (sigma * (-U[u, ]) - regJ * V[j, : NAs are not allowed in subscripted assignments

I am getting this error

Error in V[j, ] <- V[j, ] + lambda * (sigma * (-U[u, ]) - regJ * V[j, : NAs are not allowed in sub-scripted
assignments

on default settings, although there are no NAs in the dataset. When i set the lambda to 0.001 then I get the following error;

Error in U[u, ] <- U[u, ] + lambda * (sigma * (V[i, ] - V[j, ]) - regU * :
replacement has length zero

AprUsg1.zip

bpr keeps on running without getting to a solution

i'm trying to use the bpr algorithm following the example given in the vignette:

data("mlLatest100k")
ML <- defineData(mlLatest100k, minimum = .5, maximum = 5, intScale = TRUE)
subML <- ML[rowRatings(ML)>=40, colRatings(ML)>=30]
bpr <- rrecsys(subML, "BPR", k = 10, randomInit = FALSE, 
               regU = .0025, regI = .0025, regJ = 0.0025, updateJ = TRUE)

Unfortunately, even if i let this running for an hour, i don't reach a solution, it just keeps on running.

I tried adding a stopping criterion and / or setting randomInit to TRUE with no effect:

setStoppingCriteria(nrLoops = 10)

Am i doing something wrong?

could not find function "eval_nDCG"

I am using R package ‘rrecsys’ version 0.9.7.3.1 and yet I cannot use eval_nDCG.
The function is documented in the help reference (?) but I cannot use it.
I get the following error: could not find function "eval_nDCG"
Am I doing something wrong? This is unusual and my first experience of a function documented and yet not available.

Implement with sparse matrix rather than matrix??

Hey thank you for implementing this recommender system library. I have been using it to deal with some big dataset, e.g. 22531 users and 43968 items. To define the dataSet I just run out of memory since it requires a matrix. Would you be able to change it to a sparse matrix?

nDCG per user other than per fold

Another thing is with the returned metric values. To do statistical tests, e.g. t-tests, more samples are needed and by increasing number of folds just to get over 30 samples is simply too time costly. I have tried modifying the evalRec.R file with
# Combine the normal res with the nDCG per folds as a list
res <- list(res, nDCG_folds)
where nDCG_folds contains all the nDCG per users. But I feel like there could be a much more elegant solution where the user can easily access the metric value per user with result. I would be happy to try and help implement something.

recommendMF does not work with UBclass or IBclass

Function recommendMF does not work (while recommendHPR does).
It looks like an error in line to call "UseMethod("recommendMF", model)".

userBasedRec <- rrecsys(ML, "ubknn", simFunct="Pearson")
recommendMF(userBasedRec,topN=3, pt=1)
Error in UseMethod("recommendMF", model) : 
  no applicable method for 'recommendMF' applied to an object of class "c('UBclass', 'SimilBasedClass')"

NA's returned by recommendHPR

I'm trying to reproduce recommendHPR example:

myratings <- matrix(sample(c(0:5), size = 200, replace = TRUE,  prob = c(.6,.08,.08,.08,.08,.08)), nrow = 20, byrow = TRUE)
myratings <- defineData(myratings)
r <- rrecsys(myratings, alg = "FunkSVD", k = 2)
rec <- recommendHPR(r)

But myratings matrix has 0 as minimun value, so I've included minimum = 0 at defineData function. In this case, recommendHPR returns a list of NA's. Have I done something wrong?

Q: How to test the recommand system result correct rate?

If I have a training set x , and a test set y ,than I execute R command like this:
x = defineData(trainingset,sparseMatrix = TRUE)
y = defineData(testset,sparseMatrix =TRUE)
r <- rrecsys(test, alg = "UBKNN", simFunct = "cos") //use UBKNN algorithm

then how can I compare "r" with "y" ?
I can't find any function for this type of compare , and the evalXXXX function does NOT have another input for this situation .

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.