Giter VIP home page Giter VIP logo

maithileec / maithilee-code-clause Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23.12 MB

I got an internship from Code Clause for the role of Data Science Intern. I had been allocated with 4 tasks, and this repository consists all of them. Hope its helpful if you need any. Thank you.

Jupyter Notebook 99.51% Python 0.32% CSS 0.17%
stock-market-prediction wine-quality-prediction personalized-medicine-recommending-system recommendation-system-for-retail-stores

maithilee-code-clause's Introduction

Product-Recommendation

Business Value:

Customers who are prompted with personalized product recommendations drive 24% of the orders and 26% of the revenues. This signifies how much significance product recommendation has on order volume and overall sales revenue. A product recommender system is a system with the goal of predicting and compiling a list of items that the customer is likely to purchase.

Here we are gooing to produce a list of recommendations:based on collaborative filtering method.

Collaborative filtering: It is a method based on previous user behaviours such a pages they viewed, products they purchased or ratings they have given to different items. The assumption here is that a user is likely to purchase or view similar type of contents that they have viewed or purchased in the past.

In this process we first develop a user to item matrix where individual users are represented in rows and individual items in columns, and then compute the similarities between users by using the cosine similarity equation.

U1 and U2 represents user 1 and user 2 P1i and P2i represent product i that user 1 and user 2 have purchased.

Problem Statement

To build a product recommender system with the goal of predicting and commpiling a list of items that a customer is likely to purchase.

Data

Each row of data represents a transaction for a particular item and the attributes correspond to the following:

InvoiceNo : Unique identifier for transaction

StockCode : Unique identifier for the stock item being purchased

Description : Description of item

Quantity : Number of units purchased

InvoiceDate : Date of purchase

UnitPrice : Cost of one unit of the item

CustomerID : Unique Identifier for customer

Country : Country of transaction

Approach

  • Importing Necessary Dependencies

  • Loading Data

  • Data Processing

    • Removing Product Returns
    • Identifying Null Rows
    • Handling Nan CustomerID
    • Creating Customer-item Matrix
  • Collaborative Filtering

    • User-based Collaborative filtering
      • Making Recommendations
    • Item-based Collaborative filtering
      • Making Recommendations

Data Processing

Removing Product Returns : The negative value in quantity column are products that were returned after purchase and hence will not be considered as purchase.

Identifying and Handling NaN : Without correct or missing values in dataset we will not be able to buld a proper recommendation system.

Creating Customer_Item Matrix : Tabular data where each column represents each product or item and each row represents a customer and the valule in each cell represents whether the customer purchased the given product or not.

Collaborative Filtering

  • User-based

We compute the cosine similarity from the customer item matrix to determine similarity between user's purchase behaviour.

Customers having high similarity with CustomerId 12350 is given as

For reference we take Cusstomer 12350 as A and Customer 17935 as B So Identifying the items purchased by Customer A and Customer B and the remainder of Items of Customer A over Customer B, we can safely assume that since there is high similarity between the customers the remainder of the priducts purchased by customer A is also likely to be purchased by customer B. Hence we make the recommendation of those remaining products to Customer B.

  • Item based Filtering

We take the transpose of the customer-item matrix to get the item similarity matrix and proceed with same steps in order to make recommendations for similar items bought by customers.

Conclusion

Using user-based collaborative filtering we can can do targeted product recommendations for individual customers. We can also custom-tailor and also include these products that each target customer is likely to purchase in marketing messages which can potentially drive more conversions from customers. However it is limited to only existing customers, however item-based colloborative filtering method overcomes this drawback and can be applied to both new and existing customers to drive higher conversion from customers.

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.