Recommenderlab error unable to find inherited method

183 Views Asked by At

I'm a newbie in R and need some advice with recommenderlab.

I have a "training" dataset comprised of 6 variables, and the first line looks like this:

              song_id                                  user_id     title release               artist_name year
3  SOAAAGQ12A8C1420C8 384e068d83822096b2ef9a35ba520d97a8f74741 Orgelblut Dolores Bohren & Der Club Of Gore 2008

I'm trying to use recommenderlab to use UBCF, and use the following code:

rec <- Recommender("train", method = "UBCF")

But get this error

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘Recommender’ for signature ‘"character"’

Any idea what is wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

train should be your training data, not a string. Can you try this:

rec <- Recommender(train, method = "UBCF")