{"id":329288,"date":"2023-08-14T13:00:00","date_gmt":"2023-08-14T13:00:00","guid":{"rendered":"https:\/\/pyimagesearch.com\/?p=40090"},"modified":"2023-08-14T13:00:00","modified_gmt":"2023-08-14T13:00:00","slug":"amazon-product-recommendation-systems","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2023\/08\/14\/amazon-product-recommendation-systems\/","title":{"rendered":"Amazon Product Recommendation Systems"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<p><script src=\"https:\/\/fast.wistia.com\/embed\/medias\/ctufwxhaef.jsonp\" async=\"\"><\/script><script src=\"https:\/\/fast.wistia.com\/assets\/external\/E-v1.js\" async=\"\"><\/script><\/p>\n<div class=\"wistia_responsive_padding\" style=\"padding:56.25% 0 0 0;position:relative;\">\n<div class=\"wistia_responsive_wrapper\" style=\"height:100%;left:0;position:absolute;top:0;width:100%;\">\n<div class=\"wistia_embed wistia_async_ctufwxhaef seo=true videoFoam=true\" style=\"height:100%;position:relative;width:100%\">\n<div class=\"wistia_swatch\" style=\"height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;\"><img decoding=\"async\" src=\"https:\/\/fast.wistia.com\/embed\/medias\/ctufwxhaef\/swatch\" style=\"filter:blur(5px);height:100%;object-fit:contain;width:100%;\" alt=\"\" aria-hidden=\"true\" onload=\"this.parentNode.style.opacity=1;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"TOC\"\/>\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/pyimagesearch.com\/\">Home<\/a><\/span><\/div>\n<h2><strong>Table of Contents<\/strong><\/h2>\n<div class=\"toc\">\n<ul>\n<li id=\"TOCh2BPTitle\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h2BPTitle\">Amazon Product Recommendation Systems<\/a><\/li>\n<ul>\n<li id=\"TOCh3RPR\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h3RPR\">Related-Product Recommendations<br \/>\n                <\/a><\/p>\n<ul><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h3RPR\"><br \/>\n                    <\/a><\/p>\n<li id=\"TOCh4ProductGraph\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h3RPR\"><\/a><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4ProductGraph\">Product Graph<\/a><\/li>\n<ul>\n<li id=\"TOCh5Relationships\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h5Relationships\">Product Relationships<\/a><\/li>\n<li id=\"TOCh5Bias\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h5Bias\">Selection Bias and Cold Start<\/a><\/li>\n<li id=\"TOCh5Construction\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h5Construction\">Graph Construction<\/a><\/li>\n<\/ul>\n<li id=\"TOCh4Forward\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4Forward\">Product Embedding Generation: Forward Pass<\/a><\/li>\n<ul>\n<li id=\"TOCh5Algorithm\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h5Algorithm\">Algorithm<\/a><\/li>\n<li id=\"TOCh5Related\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h5Related\">Related-Product Recommendation<\/a><\/li>\n<\/ul>\n<li id=\"TOCh4Loss\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4Loss\">Loss Function and Training<\/a><\/li>\n<\/ul>\n<\/li>\n<li id=\"TOCh3RepeatPurchase\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h3RepeatPurchase\">Repeat Purchase Recommendations<\/a><\/li>\n<ul>\n<li id=\"TOCh4RepeatCustomer\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4RepeatCustomer\">Repeat Customer Probability Model<\/a><\/li>\n<li id=\"TOCh4ATDM\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4ATDM\">Aggregate Time Distribution Model<\/a><\/li>\n<li id=\"TOCh4PGM\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4PGM\">Poisson-Gamma Model<\/a><\/li>\n<\/ul>\n<li id=\"TOCh3QASR\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h3QASR\">Query-Attribute Search Recommendation<\/a><\/li>\n<ul>\n<li id=\"TOCh4QIC\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4QIC\">Query Intent Classification<\/a><\/li>\n<li id=\"TOCh4Explicit\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4Explicit\">Explicit Attribute Parsing<\/a><\/li>\n<li id=\"TOCh4Implicit\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h4Implicit\">Implicit Attribute Recommendation<\/a><\/li>\n<\/ul>\n<\/ul>\n<li id=\"TOCh2Summary\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h2Summary\">Summary<\/a><\/li>\n<ul>\n<li id=\"TOCh3Citation\"><a rel=\"noopener\"  href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#h3Citation\">Citation Information<\/a><\/li>\n<\/ul>\n<\/ul>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h2BPTitle\"\/>\n<h2><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh2BPTitle\"><strong>Amazon Product Recommendation Systems<\/strong><\/a><\/h2>\n<p>In this tutorial, you will learn about Amazon product recommendation systems.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/pyimagesearch.com\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured.png\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured.png?lossy=2&#038;strip=1&#038;webp=1\" alt=\"\" class=\"wp-image-40848\" width=\"603\" height=\"500\" srcset=\"https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured.png?size=126x104&amp;lossy=2&amp;strip=1&amp;webp=1 126w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured-300x249.png?lossy=2&amp;strip=1&amp;webp=1 300w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured.png?size=378x313&amp;lossy=2&amp;strip=1&amp;webp=1 378w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured.png?size=504x418&amp;lossy=2&amp;strip=1&amp;webp=1 504w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured-768x637.png?lossy=2&amp;strip=1&amp;webp=1 768w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/08\/amazon-rec-systems-featured.png?lossy=2&amp;strip=1&amp;webp=1 940w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/a><\/figure>\n<\/div>\n<p>Over the past decade, Amazon has become the first place to look for any product we want. With hundreds of millions of items in its catalog, it has made shopping easy for customers by putting the items they are likely to purchase in front. Everyone who comes to amazon.com sees a different homepage personalized according to his interests and purchases.<\/p>\n<p>Behind the scenes are state-of-the-art recommendation engines that suggest a few products (from a vast catalog) based on your interests, current context, past behavior, and purchases. For example, the app might suggest iPhone covers if you recently purchased an iPhone or are currently looking to purchase one. Another example would be recommending products (e.g., toothpaste, diapers, etc.) based on your purchasing history to promote repeat purchasing.<\/p>\n<p>This lesson will cover several aspects of Amazon recommendations (e.g., related-product recommendations, repeat purchase recommendations, and search recommendations) and how they work behind the scenes.<\/p>\n<p>This lesson is the 1st in a 3-part series on <strong>Deep Dive into Popular Recommendation Engines 102<\/strong>:<\/p>\n<ol>\n<li><a href=\"https:\/\/pyimg.co\/m8ps5\"  rel=\"noreferrer noopener\"><strong><em>Amazon Product Recommendation Systems<\/em><\/strong><\/a><strong> (this tutorial)<\/strong><\/li>\n<li><em>YouTube Video Recommendation Systems<\/em><\/li>\n<li><em>Spotify Music Recommendation Systems<\/em><\/li>\n<\/ol>\n<p><strong>To learn how the Amazon recommender systems work, <\/strong><strong><em>just keep reading.<\/em><\/strong><\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h2BPTitle\"\/>\n<h2><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh2BPTitle\"><strong>Amazon Product Recommendation Systems<\/strong><\/a><\/h2>\n<p>In this lesson, we will discuss Amazon\u2019s three major recommendation systems: related product, repeat purchase, and query-attribute search recommendations.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h3RPR\"\/>\n<h3><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh3RPR\"><strong>Related-Product Recommendations<\/strong><\/a><\/h3>\n<p>Recommending related products (<strong>Figure 1<\/strong>) to customers is important as it helps them find the right products easily on an e-commerce platform and, at the same time, helps them discover new products, thereby delivering them a great shopping experience. The goal of the related-product recommendation is to recommend top-<img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/> products that are likely to be bought together with the query product.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh6.googleusercontent.com\/KNy7JBkxg6EpF7XNUCsU8ZjMO09YW6flc9tD0W0XpBYeUHeXqoF2g2MErBidhRq4AesiZQhhc7ZGsHk9Tsu4tb0D1mxuBIPSA3Wo7G-Vtld-jSqWlHUTkDl-_5rq4w20ZagqSVDOPrtIkvDE1u14Wbc\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/KNy7JBkxg6EpF7XNUCsU8ZjMO09YW6flc9tD0W0XpBYeUHeXqoF2g2MErBidhRq4AesiZQhhc7ZGsHk9Tsu4tb0D1mxuBIPSA3Wo7G-Vtld-jSqWlHUTkDl-_5rq4w20ZagqSVDOPrtIkvDE1u14Wbc\" alt=\"\" width=\"700\" height=\"343\"\/><\/a><figcaption><strong>Figure 1:<\/strong> Related-product recommendations at Amazon (source: <a href=\"https:\/\/laptrinhx.com\/12-ways-amazon-optimizes-product-pages-to-drive-billions-45692295\/\"  rel=\"noreferrer noopener\">LaptrinhX<\/a>).<\/figcaption><\/figure>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4ProductGraph\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4ProductGraph\"><strong>Product Graph<\/strong><\/a><\/h4>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h5Relationships\"\/>\n<h5><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh5Relationships\"><strong>Product Relationships<\/strong><\/a><\/h5>\n<p>To formulate the problem statement, let\u2019s assume <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/>, <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/92e\/92eb5ffee6ae2fec3ad71c777531578f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='b' title='b' class='latex' \/>, and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4a8\/4a8a08f09d37b73795649038408b5f33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='c' title='c' class='latex' \/> be any three products and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/a2e\/a2e37bcce0c81964e7e6519fff46ec8f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_\\text{cp}' title='R_\\text{cp}' class='latex' \/>, <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/b72\/b72a067492c28d31e73b1721ea536370-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_\\text{cv}' title='R_\\text{cv}' class='latex' \/>, and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/6e9\/6e933ea0ec833d4e2ebd984c4c499e3e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_\\text{like}' title='R_\\text{like}' class='latex' \/> be three binary relationships where:<\/p>\n<ul>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/117\/1175ca2056e2eab7e438ecacb8ffffb1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b' title='aR_\\text{cp}b' class='latex' \/> represents that product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/> is co-purchased with product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/92e\/92eb5ffee6ae2fec3ad71c777531578f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='b' title='b' class='latex' \/>.<\/li>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/5da\/5daec67049d0823077891b639fe9c1f0-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cv}b' title='aR_\\text{cv}b' class='latex' \/> represents that product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/> is co-viewed with product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/92e\/92eb5ffee6ae2fec3ad71c777531578f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='b' title='b' class='latex' \/>.<\/li>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/a48\/a48005942b95bcceaaf32751910509c1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{like}b' title='aR_\\text{like}b' class='latex' \/> represents that product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/> is similar to product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/92e\/92eb5ffee6ae2fec3ad71c777531578f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='b' title='b' class='latex' \/>.<\/li>\n<\/ul>\n<p><strong>Figure 2<\/strong> illustrates a product graph where green and blue edges represent co-purchase and co-view edges. AC refers to the adapter, AP refers to AirPods, P refers to iPhone, and PC refers to the phone case. Phone case PC is co-viewed and similar to other phone cases PC1, PC2, and PC3. Note that co-purchase edges are directional as <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/b4b\/b4b597aecd9b5ef277c286d168f5b8af-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b \\nRightarrow bR_\\text{cp}a' title='aR_\\text{cp}b \\nRightarrow bR_\\text{cp}a' class='latex' \/>. This is called the product asymmetry challenge in a related-product recommendation.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh6.googleusercontent.com\/C8ADZbsG2SXv5uZXZ9qUm-j1P1hzQ33XwSypWe7_hIzU6PuZua3_MpLsX2vI8B9FVNNX3SwXszfsVjG6B_XrbBZ4G_-DWUtuiVNde-Ku57D2INsgwoWDa4TNJXq5fj5CdY3DEnseMXSqVCX3yKK3fNA\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/C8ADZbsG2SXv5uZXZ9qUm-j1P1hzQ33XwSypWe7_hIzU6PuZua3_MpLsX2vI8B9FVNNX3SwXszfsVjG6B_XrbBZ4G_-DWUtuiVNde-Ku57D2INsgwoWDa4TNJXq5fj5CdY3DEnseMXSqVCX3yKK3fNA\" alt=\"\" width=\"568\" height=\"500\"\/><\/a><figcaption><strong>Figure 2:<\/strong> Product graph representing co-purchase and co-view relationships between products (source: <a href=\"https:\/\/assets.amazon.science\/d6\/56\/d03a00d14fd39c3486614e611e51\/recommending-related-products-using-graph-neural-networks-in-directed-graphs.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h5Bias\"\/>\n<h5><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh5Bias\"><strong>Selection Bias and Cold Start<\/strong><\/a><\/h5>\n<p>Along with capturing the asymmetry in the co-purchase relationship, related-product recommendations suffer from the challenge of selection bias, which is inherent to historical purchase data due to product availability, price, etc.<\/p>\n<p>For example, the first customer was presented with phone cases PC and PC1 due to the unavailability of PC2 in their location. At the same time, a second customer was presented with only PC and PC2 because PC1 was out of stock. However, both end up purchasing PC, but that doesn\u2019t mean that PC is a better choice. This creates a selection bias problem.<\/p>\n<p>To mitigate this, we also need to capture second-order relationships of the following types:<\/p>\n<ul>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b \\land bR_\\text{cv}c \\implies aR_\\text{cp}c' title='aR_\\text{cp}b \\land bR_\\text{cv}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 182w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 182px) 100vw, 182px' \/><\/li>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cv}b \\land bR_\\text{cp}c \\implies aR_\\text{cp}c' title='aR_\\text{cv}b \\land bR_\\text{cp}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 182w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 182px) 100vw, 182px' \/><\/li>\n<\/ul>\n<p>Another challenge in related-product recommendations is the cold start problem, where we might also need to suggest newly launched products. Assume <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4a8\/4a8a08f09d37b73795649038408b5f33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='c' title='c' class='latex' \/> is a new product, and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/92e\/92eb5ffee6ae2fec3ad71c777531578f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='b' title='b' class='latex' \/> are existing products. To address this, we need to uncover relationships of the following type:<\/p>\n<ul>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ef\/8effd35f1785a1da2976d2703583dd57-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='cR_\\text{like}a \\land aR_\\text{cp}b \\implies cR_\\text{cp}b' title='cR_\\text{like}a \\land aR_\\text{cp}b \\implies cR_\\text{cp}b' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ef\/8effd35f1785a1da2976d2703583dd57-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 189w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ef\/8effd35f1785a1da2976d2703583dd57-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 189px) 100vw, 189px' \/> when <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4a8\/4a8a08f09d37b73795649038408b5f33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='c' title='c' class='latex' \/> is the query product.<\/li>\n<li><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/f5a\/f5ae3dd0fa72b5666bd0786bbf82c3e9-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b \\land bR_\\text{like}c \\implies aR_\\text{cp}c' title='aR_\\text{cp}b \\land bR_\\text{like}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/f5a\/f5ae3dd0fa72b5666bd0786bbf82c3e9-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 189w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/f5a\/f5ae3dd0fa72b5666bd0786bbf82c3e9-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 189px) 100vw, 189px' \/> when <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4a8\/4a8a08f09d37b73795649038408b5f33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='c' title='c' class='latex' \/> is the related product.<\/li>\n<\/ul>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h5Construction\"\/>\n<h5><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh5Construction\"><strong>Graph Construction<\/strong><\/a><\/h5>\n<p>Amazon uses graph neural networks (GNNs) to model these relationships between products by learning their respective product embeddings (<strong>Figure 3<\/strong>).  Before describing the approach, let\u2019s look at how the product graph is constructed.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh4.googleusercontent.com\/tZPIALmFocZs81iHuPtSUZ-BHpZq1cMbGgghNptHlSaCRcfDd8v39o06CXfVh2oVVAes2Q0Kj8kXmtG14eZvzm03-YMsd0c3ghlTXREIeV2XtWvRjM9dRPjZw6mmdf-DDAEweCxGI6aC7dKt2dBz0_E\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/tZPIALmFocZs81iHuPtSUZ-BHpZq1cMbGgghNptHlSaCRcfDd8v39o06CXfVh2oVVAes2Q0Kj8kXmtG14eZvzm03-YMsd0c3ghlTXREIeV2XtWvRjM9dRPjZw6mmdf-DDAEweCxGI6aC7dKt2dBz0_E\" alt=\"\" width=\"700\" height=\"394\"\/><\/a><figcaption><strong>Figure 3:<\/strong> Using GNNs for related-product recommendations (source: <a href=\"https:\/\/www.amazon.science\/blog\/using-graph-neural-networks-to-recommend-related-products\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>The product graph <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/dff\/dff276e6910850aaa6d29748dbc8ad1c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='G = (P, \\{ E_\\text{cp} \\cup R_\\text{cv} \\}' title='G = (P, \\{ E_\\text{cp} \\cup R_\\text{cv} \\}' class='latex' \/> consists of a set of vertices <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/44c\/44c29edb103a2872f519ad0c9a0fdaaa-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='P' title='P' class='latex' \/> that represents products. <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/db5\/db58cb4f8baf5bab0a32ff386af293e7-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='E_\\text{cp}' title='E_\\text{cp}' class='latex' \/> represents the set of co-purchase edges (i.e., <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/53d\/53d55aca509f8f0beac799210f1f02a7-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='E_\\text{cp} = \\{ (u,v) | \\forall u,v \\in P \\land uR_\\text{cp}v \\}' title='E_\\text{cp} = \\{ (u,v) | \\forall u,v \\in P \\land uR_\\text{cp}v \\}' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/53d\/53d55aca509f8f0beac799210f1f02a7-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 233w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/53d\/53d55aca509f8f0beac799210f1f02a7-ffffff-000000-0.png?size=126x10&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 233px) 100vw, 233px' \/>).  <\/p>\n<p>However, <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/db5\/db58cb4f8baf5bab0a32ff386af293e7-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='E_\\text{cp}' title='E_\\text{cp}' class='latex' \/> is prone to selection bias and might miss relationships of type <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b \\land bR_\\text{cv}c \\implies aR_\\text{cp}c' title='aR_\\text{cp}b \\land bR_\\text{cv}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 182w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 182px) 100vw, 182px' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cv}b \\land bR_\\text{cp}c \\implies aR_\\text{cp}c' title='aR_\\text{cv}b \\land bR_\\text{cp}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 182w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 182px) 100vw, 182px' \/>.<\/p>\n<p>To address this, we also include <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/197\/197a48ee14887d7dfe14e5e48d7db154-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='E_\\text{cv}' title='E_\\text{cv}' class='latex' \/> which represents the set of co-viewed edges (i.e., <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/e57\/e574a62f9692948812c9615e68c8c382-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='E_\\text{cv} = \\{ (u,v) | \\forall u,v \\in P \\land uR_\\text{cv}v \\}' title='E_\\text{cv} = \\{ (u,v) | \\forall u,v \\in P \\land uR_\\text{cv}v \\}' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/e57\/e574a62f9692948812c9615e68c8c382-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 232w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/e57\/e574a62f9692948812c9615e68c8c382-ffffff-000000-0.png?size=126x10&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 232px) 100vw, 232px' \/>).<\/p>\n<p>With this, graph <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/dfc\/dfcf28d0734569a6a693bc8194de62bf-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='G' title='G' class='latex' \/> now handles asymmetry and selection bias by containing the following product relationships:<\/p>\n<ul>\n<li>Asymmetry: <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/b4b\/b4b597aecd9b5ef277c286d168f5b8af-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b \\nRightarrow bR_\\text{cp}a' title='aR_\\text{cp}b \\nRightarrow bR_\\text{cp}a' class='latex' \/><\/li>\n<li>Selection bias: <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cp}b \\land bR_\\text{cv}c \\implies aR_\\text{cp}c' title='aR_\\text{cp}b \\land bR_\\text{cv}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 182w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/376\/3760c72e360b44d64f67f140bc599bd1-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 182px) 100vw, 182px' \/><\/li>\n<li>Selection bias: <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='aR_\\text{cv}b \\land bR_\\text{cp}c \\implies aR_\\text{cp}c' title='aR_\\text{cv}b \\land bR_\\text{cp}c \\implies aR_\\text{cp}c' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 182w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fa4\/fa46182fb754c0f07ec505fc9bb68eda-ffffff-000000-0.png?size=126x11&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 182px) 100vw, 182px' \/><\/li>\n<\/ul>\n<p><strong>Figure 4<\/strong> illustrates what a product graph looks like.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh5.googleusercontent.com\/sL15yb2oNdFTAy7SajYzG-u7ScXbCdGs_rbuyKiVcyiu0v6vzejZKpOSYMy3aV4L2YpBcudgZ2J6_oipRMjU0rJDfPTIX3DUft0QTT-9SPEhvOK47kutsqrwpRi6-dZ2quYUOavOEYlI6e3b9grzNnw\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/sL15yb2oNdFTAy7SajYzG-u7ScXbCdGs_rbuyKiVcyiu0v6vzejZKpOSYMy3aV4L2YpBcudgZ2J6_oipRMjU0rJDfPTIX3DUft0QTT-9SPEhvOK47kutsqrwpRi6-dZ2quYUOavOEYlI6e3b9grzNnw\" alt=\"\" width=\"613\" height=\"500\"\/><\/a><figcaption><strong>Figure 4:<\/strong> Product graph representing co-purchase (uni-directed) and co-view (bi-directed) relationships between products (source: <a href=\"https:\/\/www.amazon.science\/blog\/using-graph-neural-networks-to-recommend-related-products\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4Forward\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4Forward\"><strong>Product Embedding Generation: Forward Pass<\/strong><\/a><\/h4>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h5Algorithm\"\/>\n<h5><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh5Algorithm\"><strong>Algorithm<\/strong><\/a><\/h5>\n<p>The GNN approach learns two embeddings for each product:  source and target. Source and target embeddings are used when the product is a query and recommended item, respectively. <\/p>\n<p><strong>Algorithm 1<\/strong> explains the procedure for generating these embeddings. Let <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/918\/918b4478cd1bf41c6d3c9c19ff06253f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(h^s_u)^l' title='(h^s_u)^l' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/243\/243f795962551fed99c3b4ecc12b410e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(h^t_u)^l' title='(h^t_u)^l' class='latex' \/> denote the source and target embedding for product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/> at the <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/73b\/73b706eb90ffa4750bd1fc3e0e3ae2df-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='l^\\text{th}' title='l^\\text{th}' class='latex' \/> step in the algorithm. These embeddings are initialized with their respective product input features.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh6.googleusercontent.com\/Ez17GmFsKuAo919NNPOCDB5fteGJM9-xC9kqVAkwHqZ11yqW1TfN5IxgoRJAjjRyM0GeuIMC7Bg-zR-mDWHOK078ErDfOLbNgyzEH1Fxr9Kat0weAW52BxmQkTXB-bgJxVhIf7tdZGDhzkLO9RpL07U\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/Ez17GmFsKuAo919NNPOCDB5fteGJM9-xC9kqVAkwHqZ11yqW1TfN5IxgoRJAjjRyM0GeuIMC7Bg-zR-mDWHOK078ErDfOLbNgyzEH1Fxr9Kat0weAW52BxmQkTXB-bgJxVhIf7tdZGDhzkLO9RpL07U\" alt=\"\" width=\"700\" height=\"384\"\/><\/a><figcaption><strong>Algorithm 1:<\/strong> Generating product source and graph embeddings using the GNN approach (source: <a href=\"https:\/\/assets.amazon.science\/d6\/56\/d03a00d14fd39c3486614e611e51\/recommending-related-products-using-graph-neural-networks-in-directed-graphs.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>First, the algorithm extracts the co-purchase and co-view neighbors for each product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/>. The source embedding of product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/> at the <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/73b\/73b706eb90ffa4750bd1fc3e0e3ae2df-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='l^\\text{th}' title='l^\\text{th}' class='latex' \/> step (i.e., <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/918\/918b4478cd1bf41c6d3c9c19ff06253f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(h^s_u)^l' title='(h^s_u)^l' class='latex' \/>) is computed as a linear combination of two non-linear terms (<strong>Line 4<\/strong> of <strong>Algorithm 1<\/strong>). <\/p>\n<p>The first term is the non-linear aggregation of target representations of its co-purchase neighbors at the <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/244\/244366f3c81f7e56273d3f10c555f4b5-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(l-1)^\\text{th}' title='(l-1)^\\text{th}' class='latex' \/> step. Similarly, the second term is the non-linear aggregation of target representations of its co-viewed neighbors at the <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/244\/244366f3c81f7e56273d3f10c555f4b5-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(l-1)^\\text{th}' title='(l-1)^\\text{th}' class='latex' \/> step. In other words,<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8da\/8daff0e009cdaa087bfbd4076a8a625b-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(h^s_u)^l \\leftarrow \\text{ReLU} \\left (\\sum_{(u,v) \\in E_\\text{cp}} (h^t_v)^{l-1} W^l \\right) + \\text{ReLU} \\left (\\sum_{(u,v) \\in E_\\text{cv}} (h^t_v)^{l-1} W^l \\right),' title='(h^s_u)^l \\leftarrow \\text{ReLU} \\left (\\sum_{(u,v) \\in E_\\text{cp}} (h^t_v)^{l-1} W^l \\right) + \\text{ReLU} \\left (\\sum_{(u,v) \\in E_\\text{cv}} (h^t_v)^{l-1} W^l \\right),' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8da\/8daff0e009cdaa087bfbd4076a8a625b-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 495w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8da\/8daff0e009cdaa087bfbd4076a8a625b-ffffff-000000-0.png?size=126x8&#038;lossy=2&#038;strip=1&#038;webp=1 126w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8da\/8daff0e009cdaa087bfbd4076a8a625b-ffffff-000000-0.png?size=252x16&#038;lossy=2&#038;strip=1&#038;webp=1 252w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8da\/8daff0e009cdaa087bfbd4076a8a625b-ffffff-000000-0.png?size=378x24&#038;lossy=2&#038;strip=1&#038;webp=1 378w' sizes='(max-width: 495px) 100vw, 495px' \/><\/p>\n<p>where <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/394\/394285e192671701afddf64432c53984-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{ReLU}' title='\\text{ReLU}' class='latex' \/> is ReLU activation, and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/5e9\/5e95de488fc446fbe29319c68dfb26aa-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='W^l' title='W^l' class='latex' \/> are weights of a fully connected layer at step <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/2db\/2db95e8e1a9267b7a1188556b2013b33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='l' title='l' class='latex' \/>.<\/p>\n<p>We do similar things for generating target representation <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/243\/243f795962551fed99c3b4ecc12b410e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(h^t_u)^l' title='(h^t_u)^l' class='latex' \/> of each product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/> (<strong>Line 5<\/strong> of <strong>Algorithm 1<\/strong>). The source and target embeddings are then normalized (<strong>Lines 7 and 8<\/strong> of <strong>Algorithm 1<\/strong>) to the unit norm, and this process is repeated till <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/d20\/d20caec3b48a1eef164cb4ca81ba2587-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='L' title='L' class='latex' \/> steps to generate the final source and target embeddings <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/94c\/94cd66fafe0cefe241399ad97ad17603-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\theta^s_u' title='\\theta^s_u' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/229\/229e0af1daf270569055c2e8fa120ce8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\theta^t_u' title='\\theta^t_u' class='latex' \/> for each product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/>.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h5Related\"\/>\n<h5><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh5Related\"><strong>Related-Product Recommendation<\/strong><\/a><\/h5>\n<p>Given a query product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/769\/7694f4a66316e53c8cdd9d9954bd611d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='q' title='q' class='latex' \/> and its source embedding <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/249\/249a5d4b32fb39ad3dfe1b968433f9de-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\theta^s_q' title='\\theta^s_q' class='latex' \/>, we perform a nearest neighbor lookup in target embedding space and recommend top-<img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/> products. The relevance or utility score <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/9e2\/9e28c28f0a8d1d183fd8eb2fadef00b3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{relevance}(q,v)' title='\\text{relevance}(q,v)' class='latex' \/> of a candidate product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/9e3\/9e3669d19b675bd57058fd4664205d2a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='v' title='v' class='latex' \/> with respect to query product is calculated as:<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/edd\/eddf3be3f582ba0538c0fac0dd610dbf-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{relevance}(q, v) \\ = \\ (\\theta^s_q)^T(\\theta^t_v)' title='\\text{relevance}(q, v) \\ = \\ (\\theta^s_q)^T(\\theta^t_v)' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/edd\/eddf3be3f582ba0538c0fac0dd610dbf-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 195w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/edd\/eddf3be3f582ba0538c0fac0dd610dbf-ffffff-000000-0.png?size=126x13&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 195px) 100vw, 195px' \/><\/p>\n<p>Note that <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/eff\/effc498dca63c8ca02f0a55cb9373754-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{relevance}(q, v) \\neq \\text{relevance}(v, q)' title='\\text{relevance}(q, v) \\neq \\text{relevance}(v, q)' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/eff\/effc498dca63c8ca02f0a55cb9373754-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 222w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/eff\/effc498dca63c8ca02f0a55cb9373754-ffffff-000000-0.png?size=126x10&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 222px) 100vw, 222px' \/>, which helps us capture the asymmetry in co-purchase relationships.<\/p>\n<p>Given a cold-start product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4a8\/4a8a08f09d37b73795649038408b5f33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='c' title='c' class='latex' \/>, we perform a neighbor lookup to identify <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/> similar products <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/9f3\/9f32f49f5afed6058e939ab6d02a222e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\{c_1, c_2, \\dots, c_k\\}' title='\\{c_1, c_2, \\dots, c_k\\}' class='latex' \/> in the input product feature space. Then we augment the product graph with new edges <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7df\/7df84496fe4aeed97a3efa28aefae916-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\{(c, c_1), (c, c_2), \\dots, (c, c_k)\\}' title='\\{(c, c_1), (c, c_2), \\dots, (c, c_k)\\}' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7df\/7df84496fe4aeed97a3efa28aefae916-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 181w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7df\/7df84496fe4aeed97a3efa28aefae916-ffffff-000000-0.png?size=126x13&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 181px) 100vw, 181px' \/> and pass the sub-graph corresponding to product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4a8\/4a8a08f09d37b73795649038408b5f33-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='c' title='c' class='latex' \/> to <strong>Algorithm 1<\/strong> to generate its source and target embeddings. These embeddings are then used in the same way to compute the utility score.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4Loss\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4Loss\"><strong>Loss Function and Training<\/strong><\/a><\/h4>\n<p>To learn the fully connected layer parameters <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/61e\/61e9c06ea9a85a5088a499df6458d276-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='W' title='W' class='latex' \/>, we use an asymmetric loss function,  as shown in <strong>Figure 5<\/strong>.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh4.googleusercontent.com\/3sNePrQU_cMOoixdAfZiK9sT_hMJDDHSZbZG_dBSj-_oKrbVRbDQNKcXr-zuQrbqtrU4wufMt1vXd8GdV_--Mw190Bkh3IWFDLDbLpexeRk-rr3tsDpl90P_pxBbRIKJ91eX3NY1uwk7WfCHKKbrhyg\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/3sNePrQU_cMOoixdAfZiK9sT_hMJDDHSZbZG_dBSj-_oKrbVRbDQNKcXr-zuQrbqtrU4wufMt1vXd8GdV_--Mw190Bkh3IWFDLDbLpexeRk-rr3tsDpl90P_pxBbRIKJ91eX3NY1uwk7WfCHKKbrhyg\" alt=\"\" width=\"700\" height=\"351\"\/><\/a><figcaption><strong>Figure 5:<\/strong> Loss function used for training GNN for related-product recommendation (source: <a href=\"https:\/\/assets.amazon.science\/d6\/56\/d03a00d14fd39c3486614e611e51\/recommending-related-products-using-graph-neural-networks-in-directed-graphs.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>The loss function contains three terms:<\/p>\n<ul>\n<li>The first term in the loss function is a combination of two sub-terms. The first sub-term ensures that the source embedding of a product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/> and the target embedding of its co-purchased product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/9e3\/9e3669d19b675bd57058fd4664205d2a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='v' title='v' class='latex' \/> are similar.\n<p>In contrast, the second sub-term ensures that the source embedding of a product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/> and the target embedding of a randomly selected product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/9e3\/9e3669d19b675bd57058fd4664205d2a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='v' title='v' class='latex' \/> are dissimilar. <\/li>\n<\/ul>\n<ul>\n<li>The second term ensures asymmetry by assigning a high score to a co-purchased pair <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/c42\/c42edaff672d27527f95ff8156a742ef-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(u,v) \\in E_\\text{cp}' title='(u,v) \\in E_\\text{cp}' class='latex' \/> and a low score to pair <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/4cb\/4cb10b56f36ff01e3c35df067f11bf1d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(v,u) \\notin E_\\text{cp}' title='(v,u) \\notin E_\\text{cp}' class='latex' \/>. <\/li>\n<\/ul>\n<ul>\n<li>The third term ensures that co-viewed product pairs&#8217; source and target embeddings are similar. This helps mitigate selection bias as if products <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b774effe4a349c6dd82ad4f4f21d34c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='u' title='u' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/9e3\/9e3669d19b675bd57058fd4664205d2a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='v' title='v' class='latex' \/> are co-viewed, then <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/86c\/86c6108e837af761a776ab7373c4c4b3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{relevance}(q,u) \\approx \\text{relevance}(q,v)' title='\\text{relevance}(q,u) \\approx \\text{relevance}(q,v)' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/86c\/86c6108e837af761a776ab7373c4c4b3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 223w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/86c\/86c6108e837af761a776ab7373c4c4b3-ffffff-000000-0.png?size=126x10&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 223px) 100vw, 223px' \/> for an arbitrary query product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/769\/7694f4a66316e53c8cdd9d9954bd611d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='q' title='q' class='latex' \/>.<\/li>\n<\/ul>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h3RepeatPurchase\"\/>\n<h3><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh3RepeatPurchase\"><strong>Repeat Purchase Recommendations<\/strong><\/a><\/h3>\n<p>Repeat purchasing (i.e., a customer purchasing the same product multiple times) is an important phenomenon in e-commerce platforms (<strong>Figure 6<\/strong>). Modeling repeat purchases helps businesses increase their product click-through rate and makes the shopping experience easy for customers. <\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh6.googleusercontent.com\/v69_AJ0EAaxTa35Eowsa4E_5ve-z2xoX0K3f7-_u_ed1VmE3ALOCoiaFli7fZ_hgJJIdBT2Voh8LAKY-w8kdFnVIs1usBuLOSbYwe4bfgXvHYGZF0aJ55BHNjpFRtJLv1ObBQGYrFPLmDiEjiie3aU8\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/v69_AJ0EAaxTa35Eowsa4E_5ve-z2xoX0K3f7-_u_ed1VmE3ALOCoiaFli7fZ_hgJJIdBT2Voh8LAKY-w8kdFnVIs1usBuLOSbYwe4bfgXvHYGZF0aJ55BHNjpFRtJLv1ObBQGYrFPLmDiEjiie3aU8\" alt=\"\" width=\"700\" height=\"285\"\/><\/a><figcaption><strong>Figure 6:<\/strong> Buy-it-again or repeat purchase recommendations at Amazon (source: <a href=\"https:\/\/conversionsciences.com\/blog\/10-retail-conversion-lessons-from-amazon-com\/\"  rel=\"noreferrer noopener\">Conversion Sciences<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>Repeat purchase recommendations estimate the probability of a customer purchasing a product again as a function of time from their last purchase. In other words, given a customer <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0d6\/0d61f8370cad1d412f80b84d143e1257-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='C' title='C' class='latex' \/> has already purchased a product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/693\/693a3b974c23e87e8c941211cd45cfb8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='A_i' title='A_i' class='latex' \/> <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/>-times with time intervals <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/ebd\/ebd9942561653ab7dc2692b3fd10d022-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='t_1, t_2, \\dots, t_k' title='t_1, t_2, \\dots, t_k' class='latex' \/>, we want to estimate the purchase probability density:<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/43b\/43b6144a944ec3c9a7756337b6eb5153-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k)' title='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k)' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/43b\/43b6144a944ec3c9a7756337b6eb5153-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 178w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/43b\/43b6144a944ec3c9a7756337b6eb5153-ffffff-000000-0.png?size=126x13&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 178px) 100vw, 178px' \/><\/p>\n<p>In the above equation, we assume that the product purchases are independent of each other, and the equation can be decomposed into two components:<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/16a\/16ad1e3b8f27abf58d6d19ffc7995554-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k) \\approx Q(A_i) \\times R_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k, A_i=1),' title='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k) \\approx Q(A_i) \\times R_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k, A_i=1),' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/16a\/16ad1e3b8f27abf58d6d19ffc7995554-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 502w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/16a\/16ad1e3b8f27abf58d6d19ffc7995554-ffffff-000000-0.png?size=126x5&#038;lossy=2&#038;strip=1&#038;webp=1 126w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/16a\/16ad1e3b8f27abf58d6d19ffc7995554-ffffff-000000-0.png?size=252x10&#038;lossy=2&#038;strip=1&#038;webp=1 252w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/16a\/16ad1e3b8f27abf58d6d19ffc7995554-ffffff-000000-0.png?size=378x14&#038;lossy=2&#038;strip=1&#038;webp=1 378w' sizes='(max-width: 502px) 100vw, 502px' \/><\/p>\n<p>where  <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/587\/5878e4a02ec1a83a0bf7a083fd01ba6d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='Q(A_i)' title='Q(A_i)' class='latex' \/> is the repeat purchase probability of a customer buying a product a <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/d82\/d82a826c04c8cdea740e3ad3e76dd07c-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='(k + 1)^\\text{th}' title='(k + 1)^\\text{th}' class='latex' \/> time given that they have bought it <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/> times. <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/baf\/baf1cb5b7a1108e95c8842b0b2146377-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i}' title='R_{A_i}' class='latex' \/> is the distribution of <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/cdc\/cdc1e6d23cf18049fad69de09e653945-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='t_{k+1}' title='t_{k+1}' class='latex' \/>, conditioned on the customer repurchasing that product; indicated by <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/cda\/cda7682e5c10a60c7af579e992e12c37-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='A_i = 1' title='A_i = 1' class='latex' \/>. <\/p>\n<p>This lesson will discuss three frameworks Amazon uses to model repeat purchases.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4RepeatCustomer\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4RepeatCustomer\"><strong>Repeat Customer Probability Model<\/strong><\/a><\/h4>\n<p>This framework is time-independent and is based on a frequency-based probabilistic model that computes the repeat customer probability <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0bf\/0bf448b851df3cbec74f71c2dc375c8a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{RCP}(A_i)' title='\\text{RCP}(A_i)' class='latex' \/> for each product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/693\/693a3b974c23e87e8c941211cd45cfb8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='A_i' title='A_i' class='latex' \/> by using aggregate repeat purchase statistics of products by customers. In other words, it assumes that <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/1cf\/1cfffba4955163f4fc97005759a1b996-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i} = \\text{constant}' title='R_{A_i} = \\text{constant}' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0c3\/0c3972f1b01f9266004c3f19c2ce2ae9-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k) \\approx Q(A_i) \\approx \\text{RCP}(A_i)' title='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k) \\approx Q(A_i) \\approx \\text{RCP}(A_i)' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0c3\/0c3972f1b01f9266004c3f19c2ce2ae9-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 328w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0c3\/0c3972f1b01f9266004c3f19c2ce2ae9-ffffff-000000-0.png?size=126x7&#038;lossy=2&#038;strip=1&#038;webp=1 126w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0c3\/0c3972f1b01f9266004c3f19c2ce2ae9-ffffff-000000-0.png?size=252x15&#038;lossy=2&#038;strip=1&#038;webp=1 252w' sizes='(max-width: 328px) 100vw, 328px' \/>.<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fb9\/fb9ccf832b63748a30e4743c82faa319-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{RCP}(A_i) \\ = \\ \\displaystyle\\frac{\\text{\\#s of customers who bought product } A_i \\text{ more than once}}{\\text{\\#s of customers who bought product } A_i \\text{ at least once}}' title='\\text{RCP}(A_i) \\ = \\ \\displaystyle\\frac{\\text{\\#s of customers who bought product } A_i \\text{ more than once}}{\\text{\\#s of customers who bought product } A_i \\text{ at least once}}' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fb9\/fb9ccf832b63748a30e4743c82faa319-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 501w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fb9\/fb9ccf832b63748a30e4743c82faa319-ffffff-000000-0.png?size=126x10&#038;lossy=2&#038;strip=1&#038;webp=1 126w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fb9\/fb9ccf832b63748a30e4743c82faa319-ffffff-000000-0.png?size=252x20&#038;lossy=2&#038;strip=1&#038;webp=1 252w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/fb9\/fb9ccf832b63748a30e4743c82faa319-ffffff-000000-0.png?size=378x30&#038;lossy=2&#038;strip=1&#038;webp=1 378w' sizes='(max-width: 501px) 100vw, 501px' \/><\/p>\n<p>To ensure good quality of repeat product recommendations, we only recommend products for which <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/354\/354843084f25071efb242ebf1dd9aa8d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{RCP}(A_i) &gt; r_\\text{threshold}' title='\\text{RCP}(A_i) &gt; r_\\text{threshold}' class='latex' \/>, where <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/63d\/63d5b1964f94e23afba3bd484a126f45-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='r_\\text{threshold}' title='r_\\text{threshold}' class='latex' \/> is an operating threshold.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4ATDM\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4ATDM\"><strong>Aggregate Time Distribution Model<\/strong><\/a><\/h4>\n<p>Amazon analysis shows that most customers have only a few repeat purchases for a specific product (i.e., <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0bf\/0bf448b851df3cbec74f71c2dc375c8a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{RCP}(A_i)' title='\\text{RCP}(A_i)' class='latex' \/> is low). But there are many products for which Amazon has many customers making repeat purchases (i.e., <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0bf\/0bf448b851df3cbec74f71c2dc375c8a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{RCP}(A_i)' title='\\text{RCP}(A_i)' class='latex' \/> is high). Hence repeat purchases often depend on a customer&#8217;s purchase behavior.<\/p>\n<p>Aggregate time distribution (ATD) model is a time-based model that assumes that product purchase density is only a function of past purchase behavior <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/baf\/baf1cb5b7a1108e95c8842b0b2146377-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i}' title='R_{A_i}' class='latex' \/>. In other words, <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/450\/450fbb7499cb7852f915f841eceb5b48-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='Q_{A_i} = \\text{constant}' title='Q_{A_i} = \\text{constant}' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/bc2\/bc24714d48d7d67715e7038d35116fcc-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k) \\approx R_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k, A_i=1)' title='P_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k) \\approx R_{A_i}(t_{k+1} = t | t_1, t_2, \\dots, t_k, A_i=1)' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/bc2\/bc24714d48d7d67715e7038d35116fcc-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 435w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/bc2\/bc24714d48d7d67715e7038d35116fcc-ffffff-000000-0.png?size=126x6&#038;lossy=2&#038;strip=1&#038;webp=1 126w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/bc2\/bc24714d48d7d67715e7038d35116fcc-ffffff-000000-0.png?size=252x11&#038;lossy=2&#038;strip=1&#038;webp=1 252w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/bc2\/bc24714d48d7d67715e7038d35116fcc-ffffff-000000-0.png?size=378x17&#038;lossy=2&#038;strip=1&#038;webp=1 378w' sizes='(max-width: 435px) 100vw, 435px' \/>.<\/p>\n<p>Amazon uses a log-normal distribution for defining <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/baf\/baf1cb5b7a1108e95c8842b0b2146377-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i}' title='R_{A_i}' class='latex' \/>:<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/452\/4522c8d4b39a78cf4624b0456bf65ba8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i}(t) = \\mathcal{N}(\\ln(t); \\mu_i, \\sigma_i),' title='R_{A_i}(t) = \\mathcal{N}(\\ln(t); \\mu_i, \\sigma_i),' class='latex' \/><\/p>\n<p>where <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/262\/262d5ec61d4727236470a56c2e8433ef-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\mu_i' title='\\mu_i' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/654\/65445646e7a531a2185d03b58b4d60e1-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\sigma_i' title='\\sigma_i' class='latex' \/> are the mean and variance of the Gaussian distribution.<\/p>\n<p><strong>Figure 7<\/strong> illustrates the distribution of repeat purchase time intervals (<img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/e35\/e358efa489f58062f10dd7316b65649e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='t' title='t' class='latex' \/>) and log repeat purchase time intervals (<img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7af\/7aff922eee587fe861379c7f9300039a-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\log(t)' title='\\log(t)' class='latex' \/>) of a random consumable product across all its repeat purchasing customers.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh3.googleusercontent.com\/jKsdW6LSmF9c4duTnMg1GHcpDf0GWVUG30eIKPDUnaI_CgDzWD_-CNm3w1NNimasM7CPa_gt4MOatW-iqeUVkyO7iMxnhOrQC-dVPle11Mm7m9tUmo7IgxiIFts1rmbpTFGTUvcNedaHyIx9ZEFgygg\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/jKsdW6LSmF9c4duTnMg1GHcpDf0GWVUG30eIKPDUnaI_CgDzWD_-CNm3w1NNimasM7CPa_gt4MOatW-iqeUVkyO7iMxnhOrQC-dVPle11Mm7m9tUmo7IgxiIFts1rmbpTFGTUvcNedaHyIx9ZEFgygg\" alt=\"\" width=\"700\" height=\"263\"\/><\/a><figcaption><strong>Figure 7:<\/strong> Distribution of repeat purchase time intervals (<em>t<\/em>) and log repeat purchase time intervals (log(<em>t<\/em>)) of a random consumable product across all its repeat purchasing customers (source: <a href=\"https:\/\/assets.amazon.science\/40\/e5\/89556a6341eaa3d7dacc074ff24d\/buy-it-again-modeling-repeat-purchase-recommendations.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>Note that only the products having <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/354\/354843084f25071efb242ebf1dd9aa8d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\text{RCP}(A_i) &gt; r_\\text{threshold}' title='\\text{RCP}(A_i) &gt; r_\\text{threshold}' class='latex' \/> are deemed repeat purchasable and vice versa. Finally, recommendations are generated by considering all the repeat purchasable products previously bought by customers and ranking them in the descending order of their estimated probability density <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b4\/7b4fb9eeef04c386cc09f5455275a0fb-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i} (t)' title='R_{A_i} (t)' class='latex' \/> at a given time <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/e35\/e358efa489f58062f10dd7316b65649e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='t' title='t' class='latex' \/>.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4PGM\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4PGM\"><strong>Poisson-Gamma Model<\/strong><\/a><\/h4>\n<p>Poisson-gamma (PG) model is one of the most seminal works in modeling customer repeat purchases. It assumes the following two assumptions:<\/p>\n<ul>\n<li>A customer\u2019s repeat purchases follow a homogeneous Poisson process (<strong>Figure 8<\/strong>) with a repeat purchase rate <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/c6a\/c6a6eb61fd9c6c913da73b3642ca147d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\lambda' title='\\lambda' class='latex' \/>. In other words, they assume that successive repeat purchases are not correlated.<\/li>\n<li>Assume a gamma prior on <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/c6a\/c6a6eb61fd9c6c913da73b3642ca147d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\lambda' title='\\lambda' class='latex' \/> (i.e., assume that <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/c6a\/c6a6eb61fd9c6c913da73b3642ca147d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\lambda' title='\\lambda' class='latex' \/> across all customers follows a Gamma distribution with shape <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b7f9dbfea05c83784f8b85149852f08-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\alpha' title='\\alpha' class='latex' \/> and rate <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/b06\/b0603860fcffe94e5b8eec59ed813421-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\beta' title='\\beta' class='latex' \/>).<\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/lh5.googleusercontent.com\/_cDKH1arGQsOUrkpVLUg8_P5_35CEeg0f9ZFtJ_OTbwaOpAQqIwbCVHfcenQYrwKocFqr-epGVoydCh3bNJj9Ni4AdO8v-oeikRfPv-N0OYg32IbglbUAaIChfdY0PV11nFGwQ_qyY8qHlZ7pYBgnmA\"  rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/_cDKH1arGQsOUrkpVLUg8_P5_35CEeg0f9ZFtJ_OTbwaOpAQqIwbCVHfcenQYrwKocFqr-epGVoydCh3bNJj9Ni4AdO8v-oeikRfPv-N0OYg32IbglbUAaIChfdY0PV11nFGwQ_qyY8qHlZ7pYBgnmA\" alt=\"\"\/><\/a><figcaption><strong>Figure 8:<\/strong> Poisson Distribution (source: <a href=\"https:\/\/brilliant.org\/wiki\/poisson-distribution\/\"  rel=\"noreferrer noopener\">Brilliant<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>The parameters <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7b7\/7b7f9dbfea05c83784f8b85149852f08-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\alpha' title='\\alpha' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/b06\/b0603860fcffe94e5b8eec59ed813421-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\beta' title='\\beta' class='latex' \/> of the gamma distribution can be estimated using maximum likelihood estimation over the purchase rates of repeat customers. After this, the purchase rate <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/09e\/09e935077631496e33938ae4e165c97b-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\lambda_{A_i, C}' title='\\lambda_{A_i, C}' class='latex' \/> for a customer <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0d6\/0d61f8370cad1d412f80b84d143e1257-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='C' title='C' class='latex' \/> and product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/693\/693a3b974c23e87e8c941211cd45cfb8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='A_i' title='A_i' class='latex' \/> is given as:<\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/2de\/2de64ba2793c17266c29fbf72ace92f6-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\lambda_{A_i, C} \\ = \\ \\displaystyle\\frac{k  + \\alpha_i}{t + \\beta_i},' title='\\lambda_{A_i, C} \\ = \\ \\displaystyle\\frac{k  + \\alpha_i}{t + \\beta_i},' class='latex' \/><\/p>\n<p>where <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/cd0\/cd0f1069db14b3485b705eb04d3e58a4-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\alpha_i' title='\\alpha_i' class='latex' \/> and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/f54\/f543c88f1d1d45b3c49d49dbe3828b6f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='\\beta_i' title='\\beta_i' class='latex' \/> are the shape and rate parameters of gamma distribution for product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/693\/693a3b974c23e87e8c941211cd45cfb8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='A_i' title='A_i' class='latex' \/>, <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/> is the number of repeat purchases, and <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/e35\/e358efa489f58062f10dd7316b65649e-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='t' title='t' class='latex' \/> is the time elapsed since the first purchase of product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/693\/693a3b974c23e87e8c941211cd45cfb8-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='A_i' title='A_i' class='latex' \/> by customer <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0d6\/0d61f8370cad1d412f80b84d143e1257-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='C' title='C' class='latex' \/>.<\/p>\n<p>The <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/baf\/baf1cb5b7a1108e95c8842b0b2146377-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i}' title='R_{A_i}' class='latex' \/> is then assumed to be a Poisson distribution where the rate parameter is estimated using the above equation. <\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/6a6\/6a6de793c348060a6c102f000b784e50-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='R_{A_i, C}(t) \\ = \\ \\displaystyle\\sum_{m=1}^{\\infty} \\displaystyle\\frac{\\lambda^m_{A_i, C} \\exp(\\lambda_{A_i, C})}{m!}' title='R_{A_i, C}(t) \\ = \\ \\displaystyle\\sum_{m=1}^{\\infty} \\displaystyle\\frac{\\lambda^m_{A_i, C} \\exp(\\lambda_{A_i, C})}{m!}' class='latex' srcset='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/6a6\/6a6de793c348060a6c102f000b784e50-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1 232w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/6a6\/6a6de793c348060a6c102f000b784e50-ffffff-000000-0.png?size=126x26&#038;lossy=2&#038;strip=1&#038;webp=1 126w' sizes='(max-width: 232px) 100vw, 232px' \/><\/p>\n<p>where <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/6f8\/6f8f57715090da2632453988d9a1501b-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='m' title='m' class='latex' \/> is the expected number of purchases, this model assumes that <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/3ca\/3ca4433348f2dbec50e09fe0c6258522-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='Q_{A_i}' title='Q_{A_i}' class='latex' \/> is fixed, just like the ATD approach.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h3QASR\"\/>\n<h3><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh3QASR\"><strong>Query-Attribute Search Recommendation<\/strong><\/a><\/h3>\n<p>Amazon search queries are mostly related to products and are often short (three to four words) and not too descriptive. Such short and undescriptive queries can lead to suboptimal search results because of an information shortage. Amazon leverages attribute recommendations to improve the quality of search recommendations for short queries.<\/p>\n<p>The attribute recommendation (<strong>Figure 9<\/strong>) takes the customer query as input and recommends implicit attributes that don\u2019t explicitly appear in the search query. For example, for a search query \u201c<em>iphone 8<\/em>,\u201d the attribute recommendation will suggest additional attributes like \u201c<strong>brand:<\/strong>apple,\u201d \u201c<strong>operating_system:<\/strong>ios,\u201d \u201c<strong>complements:<\/strong> phone case,\u201d and \u201c<strong>substitute_brand:<\/strong> samsung.\u201d These additional attributes can enrich the search query and help the search engine provide better results.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh3.googleusercontent.com\/8EIjLimIy5T1deJlOs-UjbArUzN0phZxJc_6YCGLvr7Z8WZgK1kW_COVfXWgt1Pg_9KGEi2e_dr8xXMA743aitiw4fn-aQyzuhX7z8Fv9q3qkj6fKZs1fmbHHlZUwRohSJsvWU8cMFWC0rxbocTXbAs\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/8EIjLimIy5T1deJlOs-UjbArUzN0phZxJc_6YCGLvr7Z8WZgK1kW_COVfXWgt1Pg_9KGEi2e_dr8xXMA743aitiw4fn-aQyzuhX7z8Fv9q3qkj6fKZs1fmbHHlZUwRohSJsvWU8cMFWC0rxbocTXbAs\" alt=\"\" width=\"700\" height=\"172\"\/><\/a><figcaption><strong>Figure 9:<\/strong> Overview of Attribute recommendation at Amazon Search (source: <a href=\"https:\/\/assets.amazon.science\/73\/50\/22098aa04c14958b9bd66901fa64\/query-attribute-recommendation-at-amazon-search.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>The attribute recommendation model comprises three modules: query intent classification, explicit attribute recognition, and implicit attribute recommendation. We will now describe each of these in detail.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4QIC\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4QIC\"><strong>Query Intent Classification<\/strong><\/a><\/h4>\n<p>The intent of a query is defined as the product type intent of the question. For example, the intent of the query \u201ciPhone 14\u201d is \u201cphone,\u201d and for \u201cNike shoes,\u201d it is \u201cshoes.\u201d Amazon has more than 3000 product types; hence, it is posed as a multi-label classification where a query intent can be classified into one or more product types. <\/p>\n<p>Given a query <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/769\/7694f4a66316e53c8cdd9d9954bd611d-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='q' title='q' class='latex' \/> and country id <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/6f8\/6f8f57715090da2632453988d9a1501b-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='m' title='m' class='latex' \/>, the model predicts whether each product type is relevant to the question. For training, Amazon uses past customer click behavior from the search logs. These logs contain the number of clicks on each product for a country and query pair. <\/p>\n<p>Each product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/> is assigned a product type <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/aa5\/aa58d9bd56fe739801a340a2d0a4780f-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='L_a' title='L_a' class='latex' \/> from a catalog <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/d20\/d20caec3b48a1eef164cb4ca81ba2587-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='L' title='L' class='latex' \/>. Each country-query pair <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/011\/0117d9cda65290cb69e5bd6bb5022372-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='x_i = (m_i, q_i)' title='x_i = (m_i, q_i)' class='latex' \/> is assigned a label, <\/p>\n<p class=\"has-text-align-center\"><img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/7e1\/7e1b8ca73fa7fc89b9c252498ad29544-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='y_{it} \\ = \\ \\displaystyle\\frac{\\displaystyle\\sum_{L_a = t} N_{ia}}{\\displaystyle\\sum_a N_{ia}},' title='y_{it} \\ = \\ \\displaystyle\\frac{\\displaystyle\\sum_{L_a = t} N_{ia}}{\\displaystyle\\sum_a N_{ia}},' class='latex' \/><\/p>\n<p>where <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/1ff\/1ff8dea395105e01c3dc3e8a24001ae2-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='N_{ia}' title='N_{ia}' class='latex' \/> is the number of clicks on product <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/0cc\/0cc175b9c0f1b6a831c399e269772661-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='a' title='a' class='latex' \/> for query <img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/da3\/da326f7200e158a864695985b2e2f095-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='q_i' title='q_i' class='latex' \/>.<\/p>\n<p>As shown in <strong>Figure 10<\/strong>, the module uses a BERT (bidirectional encoder representations from transformers) model, which performs classification on top of classification token ([CLS]) output embedding. Since it&#8217;s a multi-country setting, each country has a different label space consisting of labels observed for products in that marketplace. Hence, we only get labels corresponding to that country&#8217;s marketplace. The architecture is shown in the figure below.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh4.googleusercontent.com\/gBE4OKEvrUfkD-Ayhk2kASmkAgP6hAGpKbCMoMdnnKAF5r5xzP3ypZCxEx-eJR15UpnMUj9b6Hrzh-V5WCWEEdJfqnD8WMJGhgCm_6uyvCLmG05FvCFAzN_Mc57Cedb5spYYmi4jVf3Y7ZiRpGYjeGY\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/gBE4OKEvrUfkD-Ayhk2kASmkAgP6hAGpKbCMoMdnnKAF5r5xzP3ypZCxEx-eJR15UpnMUj9b6Hrzh-V5WCWEEdJfqnD8WMJGhgCm_6uyvCLmG05FvCFAzN_Mc57Cedb5spYYmi4jVf3Y7ZiRpGYjeGY\" alt=\"\" width=\"569\" height=\"500\"\/><\/a><figcaption><strong> Figure 10:<\/strong> Intent classification model (source: <a href=\"https:\/\/assets.amazon.science\/73\/50\/22098aa04c14958b9bd66901fa64\/query-attribute-recommendation-at-amazon-search.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4Explicit\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4Explicit\"><strong>Explicit Attribute Parsing<\/strong><\/a><\/h4>\n<p>Explicit attribute parsing involves recognizing product attributes from the query (e.g., color, brand, etc.). This module uses a multilingual transformer-based model that performs recognition, as shown below. Each token goes through classification to get its classification label, denoting what attribute this token belongs to. This is illustrated in <strong>Figure 11<\/strong>:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh3.googleusercontent.com\/I2pm0iS0OfvtkCSFyWNQP6vNAfm3xwlsKvkczb536UfAcuMkTS0brHM8P_LS4CoGzpd6-E9klAmU0djV1I93WKu4Yg2hQ7p41C_6r_3OV3tiI5YCoa6z7Q-z2HdW5LagOXw9oNOpri1G3Tq8HoaqexY\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/I2pm0iS0OfvtkCSFyWNQP6vNAfm3xwlsKvkczb536UfAcuMkTS0brHM8P_LS4CoGzpd6-E9klAmU0djV1I93WKu4Yg2hQ7p41C_6r_3OV3tiI5YCoa6z7Q-z2HdW5LagOXw9oNOpri1G3Tq8HoaqexY\" alt=\"\" width=\"700\" height=\"338\"\/><\/a><figcaption><strong> Figure 11:<\/strong> Explicit attribute parsing (source: <a href=\"https:\/\/assets.amazon.science\/73\/50\/22098aa04c14958b9bd66901fa64\/query-attribute-recommendation-at-amazon-search.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h4Implicit\"\/>\n<h4><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh4Implicit\"><strong>Implicit Attribute Recommendation<\/strong><\/a><\/h4>\n<p>This module first builds an attribute relation graph using two data sources: Amazon product attributes and query attributes. Amazon product attributes are the explicit attributes sellers provide while uploading the product on their platform. For example, iPhone 8 has the attribute brand \u201capple\u201d and product type \u201cphone.\u201d<\/p>\n<p>The query attribute data is collected from customer search queries, and their corresponding explicit attributes are extracted using the parsing module described before.<\/p>\n<p>Then, the intent classification model obtains each query\u2019s product intent, and each product\u2019s intent is naturally obtained through catalog data. All this information is then used to construct the attribute relation graph shown in <strong>Figure 12<\/strong>.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/lh6.googleusercontent.com\/ODjWUu8NneYcf41ZycrNHahu-IyiJqoRBott2JRZ0zcm5ln4UlH7GDgsXAA5pPldCoe7eMztDYT4Hx2HEcvzMP0e4lPus7tA_ifwCRKNFOHv9H79lWcoBfqxdFp0uc-KT61j3qXRaoSSfKx_6Dh3pjk\"  rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/ODjWUu8NneYcf41ZycrNHahu-IyiJqoRBott2JRZ0zcm5ln4UlH7GDgsXAA5pPldCoe7eMztDYT4Hx2HEcvzMP0e4lPus7tA_ifwCRKNFOHv9H79lWcoBfqxdFp0uc-KT61j3qXRaoSSfKx_6Dh3pjk\" alt=\"\" width=\"700\" height=\"268\"\/><\/a><figcaption><strong> Figure 12:<\/strong> Implicit attribute recommendation (source: <a href=\"https:\/\/assets.amazon.science\/73\/50\/22098aa04c14958b9bd66901fa64\/query-attribute-recommendation-at-amazon-search.pdf\"  rel=\"noreferrer noopener\">Amazon Science<\/a>).<\/figcaption><\/figure>\n<\/div>\n<p>The module used GNN to generate embeddings for each attribute. These embeddings are then used to construct relationships between different attributes. During online inference, given the explicit query attributes and intent, we use the attribute relation graph to recommend implicit attributes by doing a random walk through the graph.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n<div id=\"pitch\" style=\"padding: 40px; width: 100%; background-color: #F4F6FA;\">\n<h3>What&#8217;s next? I recommend <a  href=\"https:\/\/pyimagesearch.com\/pyimagesearch-university\/?utm_source=blogPost&#038;utm_medium=bottomBanner&#038;utm_campaign=What%27s%20next%3F%20I%20recommend\">PyImageSearch University<\/a>.<\/h3>\n<p>\t<script src=\"https:\/\/fast.wistia.com\/embed\/medias\/kno0cmko2z.jsonp\" async><\/script><script src=\"https:\/\/fast.wistia.com\/assets\/external\/E-v1.js\" async><\/script><\/p>\n<div class=\"wistia_responsive_padding\" style=\"padding:56.25% 0 0 0;position:relative;\">\n<div class=\"wistia_responsive_wrapper\" style=\"height:100%;left:0;position:absolute;top:0;width:100%;\">\n<div class=\"wistia_embed wistia_async_kno0cmko2z videoFoam=true\" style=\"height:100%;position:relative;width:100%\">\n<div class=\"wistia_swatch\" style=\"height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;\"><img decoding=\"async\" src=\"https:\/\/fast.wistia.com\/embed\/medias\/kno0cmko2z\/swatch\" style=\"filter:blur(5px);height:100%;object-fit:contain;width:100%;\" alt=\"\" aria-hidden=\"true\" onload=\"this.parentNode.style.opacity=1;\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin-top: 32px; margin-bottom: 32px; \">\n\t\t<strong>Course information:<\/strong><br \/>\n\t\t80 total classes \u2022 105+ hours of on-demand code walkthrough videos \u2022 Last updated: September 2023<br \/>\n\t\t<span style=\"color: #169FE6;\">\u2605\u2605\u2605\u2605\u2605<\/span> 4.84 (128 Ratings) \u2022 16,000+ Students Enrolled\n\t<\/div>\n<p><strong>I strongly believe that if you had the right teacher you could <em>master<\/em> computer vision and deep learning.<\/strong><\/p>\n<p>Do you think learning computer vision and deep learning has to be time-consuming, overwhelming, and complicated? Or has to involve complex mathematics and equations? Or requires a degree in computer science?<\/p>\n<p>That\u2019s <em>not<\/em> the case.<\/p>\n<p>All you need to master computer vision and deep learning is for someone to explain things to you in <em>simple, intuitive<\/em> terms. <em>And that\u2019s exactly what I do<\/em>. My mission is to change education and how complex Artificial Intelligence topics are taught.<\/p>\n<p>If you&#8217;re serious about learning computer vision, your next stop should be PyImageSearch University, the most comprehensive computer vision, deep learning, and OpenCV course online today. Here you\u2019ll learn how to <em>successfully<\/em> and <em>confidently<\/em> apply computer vision to your work, research, and projects. Join me in computer vision mastery.<\/p>\n<p><strong>Inside PyImageSearch University you&#8217;ll find:<\/strong><\/p>\n<ul style=\"margin-left: 0px;\">\n<li style=\"list-style: none;\">&check; <strong>80 courses<\/strong> on essential computer vision, deep learning, and OpenCV topics<\/li>\n<li style=\"list-style: none;\">&check; <strong>80 Certificates<\/strong> of Completion<\/li>\n<li style=\"list-style: none;\">&check; <strong>105+ hours<\/strong> of on-demand video<\/li>\n<li style=\"list-style: none;\">&check; <strong>Brand new courses released <em>regularly<\/em><\/strong>, ensuring you can keep up with state-of-the-art techniques<\/li>\n<li style=\"list-style: none;\">&check; <strong>Pre-configured Jupyter Notebooks in Google Colab<\/strong><\/li>\n<li style=\"list-style: none;\">&check; Run all code examples in your web browser \u2014 works on Windows, macOS, and Linux (no dev environment configuration required!)<\/li>\n<li style=\"list-style: none;\">&check; Access to <strong>centralized code repos for <em>all<\/em> 520+ tutorials<\/strong> on PyImageSearch<\/li>\n<li style=\"list-style: none;\">&check; <strong> Easy one-click downloads<\/strong> for code, datasets, pre-trained models, etc.<\/li>\n<li style=\"list-style: none;\">&check; <strong>Access<\/strong> on mobile, laptop, desktop, etc.<\/li>\n<\/ul>\n<p style=\"text-align: center;\">\n\t\t<a  class=\"button link\" href=\"https:\/\/pyimagesearch.com\/pyimagesearch-university\/?utm_source=blogPost&#038;utm_medium=bottomBanner&#038;utm_campaign=What%27s%20next%3F%20I%20recommend\" style=\"background-color: #6DC713; border-bottom: none;\">Click here to join PyImageSearch University<\/a>\n\t<\/p>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h2Summary\"\/>\n<h2><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh2Summary\"><strong>Summary<\/strong><\/a><\/h2>\n<p>In this lesson, we discussed three Amazon recommender systems: <\/p>\n<ul>\n<li>related-product recommendation<\/li>\n<li>repeat purchase recommendation<\/li>\n<li>query attribute recommendation<\/li>\n<\/ul>\n<p>The goal of the related-product recommendation is to recommend top-<img src='https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/latex\/8ce\/8ce4b16b22b58894aa86c421e8759df3-ffffff-000000-0.png?lossy=2&#038;strip=1&#038;webp=1' alt='k' title='k' class='latex' \/> products that are likely to be bought together with the query product. Amazon creates a product graph whose vertices denote all the products and whose edges represent co-purchase (directed) and co-viewed (undirected) relationships. <\/p>\n<p>Graph neural networks (GNNs) are used to learn source and target embeddings for each product based on their relationships. The relevance of a candidate product with respect to the query product is calculated as the dot product between the source representation of the query product and the target representation of the candidate product.<\/p>\n<p>Next, repeat purchase recommendations estimate the probability of a customer purchasing a product again as a function of time from their last purchase of that product. Amazon uses three probabilistic models for modeling repeat purchases. <\/p>\n<ul>\n<li>The repeat customer probability model is a time-independent framework based on a frequency-based probabilistic model that computes the repeat customer probability for each product using aggregate repeat purchase statistics of products by customers.<\/li>\n<li>The aggregate time distribution (ATD) model is a time-based model that assumes that product purchase density is only a function of past purchase behavior. <\/li>\n<li>The Poisson-gamma (PG) model takes customers\u2019 repeat purchases following a homogeneous Poisson process, and the purchase rate across all customers follows a Gamma distribution.<\/li>\n<\/ul>\n<p>Lastly, the attribute recommendation takes the customer query as input and recommends implicit attributes that don\u2019t explicitly appear in the search query. The attribute recommendation model comprises three modules: <\/p>\n<ul>\n<li>query intent classification<\/li>\n<li>explicit attribute recognition<\/li>\n<li>implicit attribute recommendation<\/li>\n<\/ul>\n<p>The intent classification model predicts whether each product type is relevant to the query. Explicit attribute parsing involves recognizing product attributes like color, brand, etc., from the query. Finally, the implicit attribute recommendation model builds an attribute relation graph using two data sources: amazon product attributes and query attributes.<\/p>\n<p>However, this is just the tip of the iceberg. There is much more to the Amazon recommendation systems. We highly recommend going through their blog page to learn more.<\/p>\n<p>Stay tuned for an upcoming lesson on YouTube video recommendation systems!<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"h3Citation\"\/>\n<h3><a href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/#TOCh3Citation\"><strong>Citation Information<\/strong><\/a><\/h3>\n<p><strong>Mangla, P. <\/strong>\u201cAmazon Product Recommendation Systems,\u201d <em>PyImageSearch<\/em>, P. Chugh, A. R. Gosthipaty, S. Huot, K. Kidriavsteva, and R. Raha, eds., 2023, <a href=\"https:\/\/pyimg.co\/m8ps5\"  rel=\"noreferrer noopener\">https:\/\/pyimg.co\/m8ps5<\/a> <\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"classic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@incollection{Mangla_2023_Amazon_Product_Recommendation_Systems,\n  author = {Puneet Mangla},\n  title = {Amazon Product Recommendation Systems},\n  booktitle = {PyImageSearch},\n  editor = {Puneet Chugh and Aritra Roy Gosthipaty and Susan Huot and Kseniia Kidriavsteva and Ritwik Raha},\n  year = {2023},\n  url = {https:\/\/pyimg.co\/m8ps5},\n}<\/pre>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n<div style=\"padding: 40px; width: 100%; background-color: #F4F6FA;\">\n<img decoding=\"async\" src=\"https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/05\/maskcv.png?lossy=2&#038;strip=1&#038;webp=1\" alt=\"Featured Image\" style=\"width: 100%; height: auto; margin-bottom: 20px;\" srcset=\"https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/05\/maskcv.png?size=126x70&#038;lossy=2&#038;strip=1&#038;webp=1 126w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/05\/maskcv-300x166.png?lossy=2&#038;strip=1&#038;webp=1 300w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/05\/maskcv.png?size=378x209&#038;lossy=2&#038;strip=1&#038;webp=1 378w, https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2023\/05\/maskcv.png?lossy=2&#038;strip=1&#038;webp=1 500w\" sizes=\"(max-width: 500px) 100vw, 500px\"><\/p>\n<h3>Unleash the potential of computer vision with Roboflow &#8211; Free!<\/h3>\n<ul style=\"margin-left: 0px;\">\n<li style=\"list-style: none;\">Step into the realm of the future by <a  href=\"https:\/\/roboflow.com\/?ref=pyimagesearch\">signing up or logging into your Roboflow account<\/a>. Unlock a wealth of innovative dataset libraries and revolutionize your computer vision operations.<\/li>\n<li style=\"list-style: none;\">Jumpstart your journey by choosing from our broad array of datasets, or benefit from PyimageSearch\u2019s comprehensive library, crafted to cater to a wide range of requirements.<\/li>\n<li style=\"list-style: none;\">Transfer your data to Roboflow in any of the 40+ compatible formats. Leverage cutting-edge model architectures for training, and deploy seamlessly across diverse platforms, including API, NVIDIA, browser, iOS, and beyond. Integrate our platform effortlessly with your applications or your favorite third-party tools.<\/li>\n<li style=\"list-style: none;\">Equip yourself with the ability to train a potent computer vision model in a mere afternoon. With a few images, you can import data from any source via API, annotate images using our superior cloud-hosted tool, kickstart model training with a single click, and deploy the model via a hosted API endpoint. Tailor your process by opting for a code-centric approach, leveraging our intuitive, cloud-based UI, or combining both to fit your unique needs.<\/li>\n<li style=\"list-style: none;\">Embark on your journey today with absolutely no credit card required. Step into the future with Roboflow.<\/li>\n<\/ul>\n<p style=\"text-align: center;\">\n        <a  class=\"button link\" href=\"https:\/\/roboflow.com\/?ref=pyimagesearch\" style=\"background-color: #6DC713; border-bottom: none;\">Join Roboflow Now<\/a>\n    <\/p>\n<\/div>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n<div id=\"download-the-code\" class=\"post-cta-wrap\">\n<div class=\"gpd-post-cta\">\n<div class=\"gpd-post-cta-content\">\n<div class=\"gpd-post-cta-top\">\n<div class=\"gpd-post-cta-top-image\"><img decoding=\"async\" src=\"https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2020\/01\/cta-source-guide-1.png?lossy=2&#038;strip=1&#038;webp=1\" alt=\"\" srcset=\"https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2020\/01\/cta-source-guide-1.png?lossy=2&#038;strip=1&#038;webp=1 410w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2020\/01\/cta-source-guide-1.png?size=126x174&#038;lossy=2&#038;strip=1&#038;webp=1 126w,https:\/\/b2633864.smushcdn.com\/2633864\/wp-content\/uploads\/2020\/01\/cta-source-guide-1.png?size=252x348&#038;lossy=2&#038;strip=1&#038;webp=1 252w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/div>\n<div class=\"gpd-post-cta-top-title\">\n<h4>Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF<\/h4>\n<\/div>\n<div class=\"gpd-post-cta-top-desc\">\n<p>Enter your email address below to <strong>join the PyImageSearch Newsletter<\/strong> and <strong>download my FREE 17-page Resource Guide PDF<\/strong> on Computer Vision, OpenCV, and Deep Learning.<\/p>\n<\/div><\/div>\n<div class=\"gpd-post-cta-bottom\">\n<form class=\"footer-cta\" action=\"https:\/\/www.getdrip.com\/forms\/657075648\/submissions\" method=\"post\"  data-drip-embedded-form=\"657075648\">\n\t\t\t\t\t<input name=\"fields[email]\" type=\"email\" value=\"\" placeholder=\"Your email address\" class=\"form-control\" \/><\/p>\n<p>\t\t\t\t\t<button type=\"submit\">Join the Newsletter!<\/button><\/p>\n<div style=\"display: none;\" aria-hidden=\"true\"><label for=\"website\">Website<\/label><br \/><input type=\"text\" id=\"website\" name=\"website\" tabindex=\"-1\" autocomplete=\"false\" value=\"\" \/><\/div>\n<\/p><\/form>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<\/div>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/\">Amazon Product Recommendation Systems<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/pyimagesearch.com\/\">PyImageSearch<\/a>.<\/p>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Table of Contents Amazon Product Recommendation Systems Related-Product Recommendations Product Graph Product Relationships Selection Bias and Cold Start Graph Construction Product Embedding Generation: Forward Pass Algorithm Related-Product Recommendation Loss Function and Training Repeat Purchase Recommendations Repeat Customer Probability Model Aggregate\u2026<\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/pyimagesearch.com\/2023\/08\/14\/amazon-product-recommendation-systems\/\">Amazon Product Recommendation Systems<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/pyimagesearch.com\/\">PyImageSearch<\/a>.<\/p>\n<\/div>","protected":false},"author":2020,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Amazon Product Recommendation Systems - ITTeacherITFreelance.hk","description":"Table of Contents Amazon Product Recommendation Systems Related-Product Recommendations Product Graph Product Relationships Selection Bias and Cold Start Graph"},"footnotes":""},"categories":[10700],"tags":[10751,10755,10752,10753,10754],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329288"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/2020"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=329288"}],"version-history":[{"count":1,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329288\/revisions"}],"predecessor-version":[{"id":329289,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329288\/revisions\/329289"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=329288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=329288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=329288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}