ĐẠT PHAN MINH
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # DATA WAREHOUSE ## Definition - **Products and Association Rules**: a set of patterns or relationships that can be discovered in large datasets. These rules identify the co-occurrence or correlations between different items in a dataset. - Association rules are used to identify relationships between items in a dataset. They represent if-then statements with 2 parts: - **Antecedent**: A set of items in the data - **Consequent**: A set of items FOUND in combination Antecedent in the data - **Metrics**: (First 2 are the main) - **Support**:  the total number of transactions in which the itemset occurs. $Support(X => Y)= \frac{\text{Transactions have X and Y}}{\text{Total Transactions}}$ - **Confidence**: the conditional probability of occurrence of consequent given the antecedent $Confidence(X => Y)= P(Y|X)=\frac{\text{Transactions have X and Y}}{\text{Transactions have X}}$ - **Lift**:  the rise in probability of having {Y} on the cart with the knowledge of {X} being present over the probability of having {Y} on the cart without any knowledge about presence of {X} - \> 1: X increase the chance of buying Y - < 1: Otherwise - = 1: unknown $Lift(X => Y)= \frac{P(Y|X)}{P(Y)}=\frac{\frac{\text{Transactions have X and Y}}{\text{Transactions have X}}}{\frac{\text{Transactions have Y}}{\text{Total Transactions}}}$ ## Use Cases - By using association rules, businesses can gain insights into customer behavior, identify cross-selling opportunities, optimize product placements, and improve overall marketing strategies. - **Market basket analysis** Association rules can identify complementary products or services that can be recommended to customers to increase sales. Retailers can collect data about purchasing patterns, recording purchase data as item barcodes are scanned by point-of-sale systems. Machine learning models can look for co-occurrence in this data to determine which products are most likely to be purchased together. The retailer can then adjust marketing and sales strategy to take advantage of this information. One example of association rule mining in retail stores is the famous “beer and diapers” rule. This rule states that customers who buy diapers are more likely to buy beer than the average customer. This rule was reportedly discovered by analyzing the sales data of a supermarket chain in the US. The possible explanation for this rule is that young fathers who are sent to buy diapers for their babies may also buy beer for themselves as a reward or a stress relief. - **Customer behavior analysis:** Association rules can reveal patterns in customer behavior, such as preferences or purchasing habits, which can be used for personalized marketing and product recommendations. Developers can collect data on how consumers use a website they create. They can then use associations in the data to optimize the website user interface -- by analyzing where users tend to click and what maximizes the chance that they engage with a call to action, for example. - **Medical diagnosis:** Association rules can be used to analyze patient data and identify potential relationships between symptoms, diseases, and treatments. Doctors can use association rules to help diagnose patients. There are many variables to consider when making a diagnosis, as many diseases share symptoms. By using association rules and machine learning-fueled data analysis, doctors can determine the conditional probability of a given illness by comparing symptom relationships in the data from past cases. As new diagnoses get made, machine learning models can adapt the rules to reflect the updated data. Examples of association rules that can be mined from medical diagnostic data can inlcude: Patients who have chest pain and high blood pressure are more likely to have heart disease than the average patient, patients who have diabetes are more likely to need insulin than the average patient or patients who have cancer and undergo chemotherapy are more likely to experience hair loss than the average patient. - **Fraud detection:** Association rules can help identify suspicious patterns or correlations in data that may indicate fraudulent activities. Some examples of association rules that can be mined from fraud detection data may include: Transactions that involve online purchases with high amounts from foreign countries are more likely to be fraudulent than the average transaction, claims that involve the same parties within a short time interval are more likely to be fraudulent than the average claim and transactions that involve credit cards with low balances and multiple merchants are more likely to be fraudulent than the average transaction. ## Case Study: Amazon As one of the largest e-commerce companies, Amazon heavily relies on association rules to enhance its product recommendations. By analyzing vast amounts of customer data, including browsing history and purchase behavior, Amazon leverages association rules to suggest related products to customers. Amazon uses association rule mining for various purposes, such as: - **Recommending products to customers based on their previous purchases or browsing history**. For example, if a customer buys a laptop, Amazon can recommend a mouse and a keyboard based on the association rules that involve laptops and accessories. - **Offering discounts or promotions on products that are frequently bought together by customers**. For example, if a customer buys a book, Amazon can offer a discount on another book that is related to the first one based on the association rules that involve books and genres. - **Placing products that are often bought together near each other in the website layout or on the same web page**. For example, if a customer searches for a camera, Amazon can display related products such as memory cards, tripods, or lenses based on the association rules that involve cameras and equipment. ![](https://hackmd.io/_uploads/r1QJObQxT.png) ![](https://hackmd.io/_uploads/Hk7JOZmea.png) ## How can Data Warehouse and DSS be used with Association Rules - **Data Warehouse:** Store transactional data, customer information, and other relevant data needed for association rule mining. With a properly designed data warehouse, businesses can extract and transform transaction data into a format suitable for association rule mining algorithms. This accelerates the process of deriving valuable association rules from the data. - **Decision Support System (DSS):** Can utilize association rules to support decision-making related to product recommendations, marketing strategies, and inventory management. For example, a DSS can generate product recommendations based on association rules to help businesses cross-sell or upsell products to customers. It can provide insights on which products are frequently purchased together and suggest strategies to optimize product placement or marketing campaigns. Additionally, a DSS can help in inventory management by identifying associations between products and assisting in supply chain management decisions, such as stock replenishment and forecasting demand. - By integrating association rules generated from the data warehouse into a DSS, businesses can make data-driven decisions and take advantage of the discovered patterns and relationships between products. This enables businesses to optimize their strategies, increase sales, and enhance customer satisfaction. ## Problem Description - **User Story**: I am the manager of a bike shop which sells bicycles, components, sports clothing and accessories. My goal is to maximize the shop's profit and improve overall customer experience. To achieve that, I need a system which can analyze the sales data of all products. From the analysis, the system can suggest an optimal way to manage the product inventory, hence motivating customers to purchase additional products during their shopping experience. I also want to the system to suggest promotion strategy to further encourage customer to spend on our products. - **System Requirements** - The system can analyze historical sales data and customer purchase patterns to identify associations between products. - The system should generate reports or visualizations to help the manager measure the performance and effectiveness of the inventory recommendation system. - The system should suggest product’s placement based on their association rules while taking into consideration the current inventory, pricing, and shelf space constraints. - The system should provide suggestions for promotional activities such as discounts, bundle deals, limited-time offers, or loyalty programs - The system should be flexible to adapt with changes in customer behavior and market trends - The system should have an intuitive user interface that allows the manager to easily access and interpret the recommendations. - The system should provide the option to customize the association rules and fine-tune the recommendation algorithm based on the specific needs and context of the bike shop ## Technology Survey - Association Rules Mining Algorithms - AIS - FP-Growth - Input: - Output: - Flow: - Apriori - All subsets of a frequent itemset must be frequent(Apriori property). - If an itemset is infrequent, all its supersets will be infrequent. - Input: Dataset, minimum support count, minimum confidence - Output: A set of association rules - Flow: - Each iteration will generate itemsets with a predefined number, remove one whose support is lower the the minimum support count => Construct a table - The subset of itemset in each iteration must be included in previous iteration tables - Stop when all generated itemset have support < minimum support count - After last iteration, define rules - S is a subset of I - Rule: S -> (I-S) - Calculate Confidence - Software to build DWH + DSS - RDBMS - ETL Tools - BI & Analytics Tools - Data Mining and Statistical Analysis Tools: - OLAP Tools - Related Work - "A Decision Support System for Product Inventory Management Using Association Rule Mining" by Smith et al. (2018) - "Association Rule-Based Product Recommendation System for Online Retailers" by Johnson et al. (2016) - A Decision Support System for Product Inventory Management - ABC classification: - Redesigning a Retail Store Based on Association Rule Mining - The paper describe an approach to redesign the store layout based on association rules. From a dataset of transactions last 6 months of a supermaket, authors first categorized products. They then applied Apriori and Éclat to deduce the association rules between categories. From the association rules, the paper suggests changing the store layout by letting categories that has positive corelation close to each other. It also suggests the different approach to redessign the store layout: the higher the support value of the category, and the less space it takes up, the closer to the door it should be placed. Two approaches are then evaluated by the distance traveled of customers and turned out to have a positive result

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully