Skip to content

item_exclude #19

Closed
Closed
@Gbau08

Description

@Gbau08

Hello Dmitriy ,

First of all thank you for your work. I've been using Rsparse since a couple of weeks and everything is running smooth and well. The addition of the evaluation metrics is really a plus and I've been toying around with data to see which algorithm works best with the data I have (currently Linear Flow).

There is something though that I can't make properly work. The argument "items_exclude" on the predict function is not working as it should when we provide the article name (stringà). I provide the names (string) of the object to exlclude but they end up in the prediction. I've looked in the code, this seems to come from these lines:

items_exclude = match(items_exclude, private$item_ids)
item_embeddings = item_embeddings[, -items_exclude, drop = FALSE]

I should have an output of 46 columns, but it gives me 122. I then use instead these lines which gives me the correct n of items:

items_exclude = Reduce(intersect, list(items_exclude,private$item_ids))
item_embeddings = item_embeddings[, !(colnames(item_embeddings) %in% items_exclude), drop=FALSE]

When I provide the itemsID, it gives me the right number of items to recommend, unfortunately it is not the right products so I'll look into that now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions