Giter Club home page Giter Club logo

market_basket_analysis's Issues

Extracting predictions from predict_cf() object

I appreciate, that you share your implementation of the improved CF in your part3 script. I am still wondering though, how to extract the results of the prediction, created by predict_cf().

My first guess was to extract the predicted items like this:

items_recom <- recomm@i
results <- data.table(Items = retail$Description[items_recom])
results 

I believe that I am wrong, because I keep getting the same 6 results, no matter how I change the fake order input.

Converting a Binary rating matrix to dgCMatrix Class

@DiegoUsaiUK I ran into an error with dgCMatrix while running part 3 of the Market Basket Analysis Code, what do you suggest ? I have tried to different things but I couldn't figure it out
Here is the code and the error message is below:
new_order <- item_list %>%
mutate(value = as.numeric(Description %in% customer_order)) %>%
spread(key = Description, value = value) %>%
as.matrix() %>%
as("dgCMatrix")
Error in item_list %>% mutate(value = as.numeric(Description %in% customer_order)) %>% :
could not find function "%>%"

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.