R: Obtaining the probability of the buyer buying the highest items from the recommenderlab package

I use custom collaborative filtering from a package recommenderlabin R to make recommendations for top-level items for the user. I use the binary matrix of custom elements as input (created from purchase history).

Is it possible to get the probability that the customer will buy an element for each of the top-level elements, and not just get top-N elements?

dB is my custom element matrix and I use the following code:

r <- as(dB, "binaryRatingMatrix")
rTrain <- r[1:874, ]
rTest <- r[875, ]

rr <- Recommender(rTrain, method = "UBCF", 
                   parameter = list(method = "Jaccard", nn = 50))

rrP <- predict(rr, rTest, n = 500, type = "topNList")
predCF <- as(rrP, "list")

In predictthe package caretyou just need to specify type="prob", so I'm looking for something like that in the package recommenderlab. I tried to deliver type="ratings", but got the same result.

+4
1

( ), . , () , , (, ), .

0

Source: https://habr.com/ru/post/1536960/


All Articles