Giter Club home page Giter Club logo

market_basket_analysis's Introduction

Market_Basket_Analysis

This is the code for a Market Basket Analysis project I have carried out. I have split the output into three parts that I have organised as follows:

  1. In the first chapter, I source, explore and format a complex dataset suitable for modelling with recommendation algorithms. The DATA can be found here: Online Retail

  2. For the second part, I will apply various machine learning algorithms for Product Recommendation and select the best performing model. This will be done with the support of the recommenderlab package. For Recommenderlab Package see: https://cran.r-project.org/package=recommenderlab

  3. In the third and final instalment, I will implement the selected model in a Shiny Web Application. Find here the Product Recommender.

market_basket_analysis's People

Contributors

diegousaiuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.