	{"id":65530,"date":"2021-12-13T11:26:57","date_gmt":"2021-12-13T11:26:57","guid":{"rendered":"https:\/\/www.artefact.com\/?post_type=news&#038;p=65530"},"modified":"2024-09-20T17:45:47","modified_gmt":"2024-09-20T16:45:47","slug":"scoring-customer-propensity-using-machine-learning-models-on-google-analytics-data","status":"publish","type":"blog","link":"https:\/\/www.artefact.com\/nl\/blog\/scoring-customer-propensity-using-machine-learning-models-on-google-analytics-data\/","title":{"rendered":"Customer Propensity scoren met behulp van Machine Learning-modellen in Google Analytics Data"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling article-author\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-background-color:#ffffff;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_2 1_2 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:50%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:50%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-1 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Auteur<\/h2><\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27150%27%20height%3D%270%27%20viewBox%3D%270%200%20150%200%27%3E%3Crect%20width%3D%27150%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/05\/Antoine-Aubay.jpeg\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left article-author-image\" style=\"width: 150px; border-radius: 54% 46% 77% 23% \/ 74% 40% 60% 26%; overflow: hidden;\" width=\"150\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-2 fusion-sep-none fusion-title-text fusion-title-size-three article-author-name-title\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Antoine Aubay<\/h3><\/div><div class=\"fusion-text fusion-text-1 article-author-description\"><p>Senior Data Wetenschapper bij Artefact<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center fusion-column-inner-bg-wrapper\" style=\"--awb-padding-top:20px;--awb-padding-right:20px;--awb-padding-bottom:20px;--awb-padding-left:20px;--awb-overflow:hidden;--awb-inner-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-top:1px;--awb-border-right:1px;--awb-border-bottom:1px;--awb-border-left:1px;--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-inner-bg-border-radius:4px 4px 4px 4px;--awb-inner-bg-overflow:hidden;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><span class=\"fusion-column-inner-bg hover-type-none\"><a class=\"fusion-column-anchor\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/scoring-customer-propensity-using-machine-learning-models-on-google-analytics-data-ba1126469c1f\" rel=\"noopener noreferrer\" target=\"_blank\"><span class=\"fusion-column-inner-bg-image\"><\/span><\/a><\/span><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-row fusion-flex-align-items-center\"><div class=\"fusion-text fusion-text-2\"><p><u>Lees ons artikel over<\/u><\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"4000\" height=\"992\" title=\"Medium Blog\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" alt class=\"lazyload img-responsive wp-image-60582\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%274000%27%20height%3D%27992%27%20viewBox%3D%270%200%204000%20992%27%3E%3Crect%20width%3D%274000%27%20height%3D%27992%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-200x50.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-400x99.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-600x149.png 600w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-800x198.png 800w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-1200x298.png 1200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png 4000w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 4000px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-3\"><p>.<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-3 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-2 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-4 description\"><p>Propensity modeling kan worden gebruikt om de impact van uw communicatie met klanten te vergroten en de uitgaven van uw reclamebudget te optimaliseren.<\/p>\n<p>Google Analytics data is een goed gestructureerde data bron die gemakkelijk kan worden omgezet in een machine learning-ready dataset.<\/p>\n<p>Backtests op historische data en technische statistieken kunnen u een eerste indruk geven van de prestaties van uw model, terwijl u met live tests en zakelijke statistieken de impact van uw model kunt bevestigen.<\/p>\n<p>Ons aangepaste machine learning-model presteerde beter dan bestaande baselines: tijdens live tests in termen van ROAS (Return on advertising spend): +221% vs op regels gebaseerd model en +73% vs off-the-shelf machine learning (Google Analytics sessie kwaliteitsscore).<\/p>\n<p>Dit artikel gaat uit van basisprincipes in machine learning en marketing.<\/p>\n<\/div><\/div><\/div><\/div><\/div><article class=\"fusion-fullwidth fullwidth-box fusion-builder-row-4 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-3 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-3 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Wat is propensity modeling?<\/h2><\/div><div class=\"fusion-text fusion-text-5\"><p>Proportionaliteitsmodellering is\u00a0<strong>inschatten hoe waarschijnlijk het is dat een klant een bepaalde actie zal uitvoeren<\/strong>. Er zijn verschillende acties die nuttig kunnen zijn om in te schatten:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-1 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Een product kopen<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Churn<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Uitschrijving<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p>etc ...<\/p>\n<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-6\"><p>In dit artikel richten we ons op het schatten van de geneigdheid om een artikel op een e-commercewebsite te kopen.<\/p>\n<p>Maar waarom koopbereidheid schatten? Omdat het toelaat om<strong>aanpassen hoe we met een klant willen communiceren.<\/strong> Stel bijvoorbeeld dat we een heel eenvoudig propensity-model hebben dat de klanten voor een bepaald product indeelt in \u201cCold\u201d (koud), \u201cWarm\u201d (warm) en \u201cHot\u201d (heet) (\u201cHot\u201d zijn klanten met de grootste kans om te kopen en \u201cCold\u201d de minste):<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27619%27%20height%3D%270%27%20viewBox%3D%270%200%20619%200%27%3E%3Crect%20width%3D%27619%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article1.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 619px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"619\" height=\"auto\" \/><div class=\"fusion-text fusion-text-7\"><p>Nou, op basis van deze classificatie<strong>u kunt voor elke klasse een specifieke gerichte reactie geven<\/strong>. U wilt misschien een andere marketingaanpak hanteren bij een klant die op het punt staat om te kopen dan bij een klant die misschien nog niet eens van uw product heeft gehoord. Ook als u een beperkt mediabudget hebt, kunt u dit richten op klanten met een hoge waarschijnlijkheid om te kopen en niet te veel uitgeven aan klanten met een kleine kans.<\/p>\n<p>Dit eenvoudige type classificatie op basis van regels kan goede resultaten opleveren en is meestal beter dan geen classificatie, maar het heeft <strong>verschillende beperkingen:<\/strong><\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-2 fusion-checklist-default type-icons paddingList dark-text\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p>Het is waarschijnlijk\u00a0<strong>niet alle data <\/strong>die u tot uw beschikking hebt, of het nu gaat om preciezere informatie over het klanttraject of uw website of andere data bronnen die u tot uw beschikking hebt, zoals CRM data.<\/p>\n<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Hoewel het voor de hand lijkt te liggen dat klanten die geclassificeerd zijn als \u201cHeet\u201d eerder geneigd zijn om te kopen dan \u201cWarm\u201d, die eerder geneigd zijn om te kopen dan \u201cKoud\u201d, geeft deze aanpak ons geen specifieke cijfers over <strong>hoe waarschijnlijk het is dat ze zullen kopen<\/strong>. Hebben \u201cwarme\u201d klanten 3% kans om te kopen? 5% ? 10% ?<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Met behulp van eenvoudige regels wordt het aantal klassen dat u kunt verkrijgen beperkt, wat\u00a0<strong>beperkt hoe aangepast uw doelgerichte reactie is<\/strong>\u00a0kunnen zijn.<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-8\"><p>Om met deze beperkingen om te gaan, kunnen we een meer data-gedreven aanpak gebruiken: gebruik\u00a0<strong>machinaal leren <\/strong>op onze data naar\u00a0<strong>een waarschijnlijkheid van aankoop voorspellen<\/strong>\u00a0voor elke klant.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-4 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Google Analytics begrijpen data<\/h2><\/div><div class=\"fusion-text fusion-text-9\"><p>Google Analytics is een\u00a0<strong>analytische webservice <\/strong>die het gebruik data en verkeer op websites en applicaties bijhoudt.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27587%27%20height%3D%270%27%20viewBox%3D%270%200%20587%200%27%3E%3Crect%20width%3D%27587%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article2.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 587px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"587\" height=\"auto\" \/><div class=\"fusion-text fusion-text-10\"><p><a class=\"bv kv\" href=\"https:\/\/support.google.com\/analytics\/answer\/3416092?hl=en#zippy=%2Cin-this-article\" target=\"_blank\" rel=\"noopener ugc nofollow\">Google Analytics data kan<strong>\u00a0gemakkelijk ge\u00ebxporteerd naar Big Query<\/strong>\u00a0<\/a>(Google Cloud Platform volledig beheerd\u00a0<a class=\"bv kv\" href=\"https:\/\/cloud.google.com\/bigquery\/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=emea-gb-all-en-dr-skws-all-solutions-trial-b-gcp-1010042&amp;utm_content=text-ad-none-any-DEV_c-CRE_335630920539-ADGP_Hybrid+%7C+SKWS+-+BMM+%7C+Txt+~+Data+Analytics+~+BigQuery%23v1-KWID_43700053279032269-kwd-47616964923-userloc_1006094&amp;utm_term=KW_%2Bbigquery-NET_g-PLAC_&amp;gclid=CjwKCAjwiY6MBhBqEiwARFSCPqzx1ubPaHp-g3MMEY8zES0fgiSrD3RYgcBGjQeNRRcV_EiS10fZ_RoCUgcQAvD_BwE&amp;gclsrc=aw.ds\" target=\"_blank\" rel=\"noopener ugc nofollow\">data magazijn service<\/a>) waar het toegankelijk is via een SQL-achtige syntaxis:<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27598%27%20height%3D%270%27%20viewBox%3D%270%200%20598%200%27%3E%3Crect%20width%3D%27598%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/article-aubay3.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 598px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"598\" height=\"auto\" \/><div class=\"fusion-text fusion-text-11\"><p>Merk op dat de Big Query-exporttabel met Google Analytics data een <strong>geneste tabel op sessieniveau:<\/strong><\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-3 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><a class=\"bv kv\" href=\"https:\/\/support.google.com\/analytics\/answer\/2731565?hl=en#zippy=%2Cin-this-article\" target=\"_blank\" rel=\"noopener ugc nofollow\">Sessies<\/a>\u00a0zijn een lijst van acties die een specifieke klant binnen een bepaald tijdsbestek uitvoert. Ze beginnen wanneer een klant een pagina bezoekt en eindigen na 30 minuten activiteit.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Elke klant kan meerdere sessies hebben.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Elke sessie kan uit meerdere treffers (d.w.z. gebeurtenissen) bestaan en elke treffer kan verschillende attributen of aangepaste statistieken hebben (daarom is de tabel genest, als u bijvoorbeeld de data op trefwoordniveau wilt bekijken, moet u de tabel plat maken).<\/div><\/li><\/ul><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27619%27%20height%3D%270%27%20viewBox%3D%270%200%20619%200%27%3E%3Crect%20width%3D%27619%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article4.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 619px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"619\" height=\"auto\" \/><div class=\"fusion-text fusion-text-12\"><p>In deze query kijken we bijvoorbeeld alleen naar\u00a0<strong>Functies op sessieniveau<\/strong>:<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27564%27%20height%3D%270%27%20viewBox%3D%270%200%20564%200%27%3E%3Crect%20width%3D%27564%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article5.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 564px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"564\" height=\"auto\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27686%27%20height%3D%270%27%20viewBox%3D%270%200%20686%200%27%3E%3Crect%20width%3D%27686%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article6.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 686px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"686\" height=\"auto\" \/><div class=\"fusion-text fusion-text-13\"><p>En in deze query hebben we een Unnest-functie gebruikt om dezelfde informatie op te vragen op <strong>trefniveau<\/strong>:<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27686%27%20height%3D%270%27%20viewBox%3D%270%200%20686%200%27%3E%3Crect%20width%3D%27686%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article7.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 686px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"686\" height=\"auto\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27686%27%20height%3D%270%27%20viewBox%3D%270%200%20686%200%27%3E%3Crect%20width%3D%27686%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article8.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 686px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"686\" height=\"auto\" \/><div class=\"fusion-text fusion-text-14\"><p>Raadpleeg voor meer informatie over GA data de\u00a0<a class=\"bv kv\" href=\"https:\/\/developers.google.com\/analytics\" target=\"_blank\" rel=\"noopener ugc nofollow\">documentatie<\/a>. Merk op dat ons project ontwikkeld is op GA360, dus als u de nieuwste versie, GA4, gebruikt, zullen er enkele kleine verschillen zijn in het data model, vooral de tabel op gebeurtenisniveau. Er zijn openbare voorbeeldtabellen van\u00a0<a class=\"bv kv\" href=\"https:\/\/console.cloud.google.com\/marketplace\/product\/obfuscated-ga360-data\/obfuscated-ga360-data?project=lexical-script-761\" target=\"_blank\" rel=\"noopener ugc nofollow\">GA360<\/a>\u00a0en\u00a0<a class=\"bv kv\" href=\"https:\/\/support.google.com\/analytics\/answer\/10937659?hl=en&amp;ref_topic=9359001#zippy=%2Cin-this-article\" target=\"_blank\" rel=\"noopener ugc nofollow\">GA4<\/a>\u00a0data beschikbaar op Big Query.<\/p>\n<p>Nu we toegang hebben tot onze ruwe data bron, moeten we feature engineering uitvoeren voordat we onze tabel kunnen voeden aan een machine-learning algoritme<\/p>\n<\/div><div class=\"fusion-title title fusion-title-5 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">De juiste functies cre\u00ebren<\/h2><\/div><div class=\"fusion-text fusion-text-15\"><p>Het doel van de feature engineering-stap is om de ruwe Google Analytics data (ge\u00ebxtraheerd uit Big Query) om te zetten in een\u00a0<strong>tafel klaar <\/strong>te gebruiken voor<strong>Machinaal leren<\/strong>.<\/p>\n<p>GA data is zeer goed gestructureerd en vereist minimale data opruimstappen. Er is echter nog steeds veel informatie aanwezig in de tabel, waarvan er veel niet bruikbaar zijn voor machinaal leren of niet zo gebruikt kunnen worden, dus het selecteren en maken van de juiste kenmerken is belangrijk. Hiervoor hebben we kenmerken ontwikkeld die het meest gecorreleerd leken te zijn met het kopen van een product.<\/p>\n<p>We hebben 4 soorten functies gemaakt:<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27625%27%20height%3D%270%27%20viewBox%3D%270%200%20625%200%27%3E%3Crect%20width%3D%27625%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article9.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 625px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"625\" height=\"auto\" \/><div class=\"fusion-text fusion-text-16\"><p>Merk op dat we al deze kenmerken op klantniveau berekenen, wat betekent dat we informatie van meerdere sessies voor elke klant samenvoegen (met het veld fullVisitorId als sleutel)<\/p>\n<\/div><div class=\"fusion-title title fusion-title-6 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Algemene kenmerken<\/h3><\/div><div class=\"fusion-text fusion-text-17\"><p>Globale functies zijn\u00a0<strong>numerieke kenmerken<\/strong>\u00a0die algemene informatie over de sessie geven.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27524%27%20height%3D%270%27%20viewBox%3D%270%200%20524%200%27%3E%3Crect%20width%3D%27524%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article10.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 524px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"524\" height=\"auto\" \/><div class=\"fusion-text fusion-text-18\"><p>Merk op dat bounce rate gedefinieerd is als % van het aantal keren dat de klant slechts \u00e9\u00e9n webpagina bezocht tijdens een sessie.<\/p>\n<p>Het was ook belangrijk om informatie op te nemen over de <strong>frequentie van gebeurtenissen<\/strong>Een klant die bijvoorbeeld net uw website heeft bezocht, is waarschijnlijk eerder geneigd om iets te kopen dan een klant die uw website 3 maanden geleden heeft bezocht. Voor meer informatie over dit onderwerp kunt u de theorie op\u00a0<a class=\"bv kv\" href=\"https:\/\/en.wikipedia.org\/wiki\/RFM_(market_research)\" target=\"_blank\" rel=\"noopener ugc nofollow\">RFM (recency, frequency monetary value)<\/a>.<\/p>\n<p>Dus hebben we een functie toegevoegd <em>Frequentie sinds laatste sessie = 1 \/ Aantal dagen sinds laatste sessie <\/em>waarmee de waarde kan worden genormaliseerd tussen 0 en 1<\/p>\n<\/div><div class=\"fusion-title title fusion-title-7 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Favoriete functies<\/h3><\/div><div class=\"fusion-text fusion-text-19\"><p>We wilden ook wat informatie toevoegen over\u00a0<strong>de belangrijkste categoriale data <\/strong>beschikbaar zoals <strong>browser of apparaat<\/strong>. Aangezien die informatie op sessieniveau is, kunnen er verschillende waarden zijn voor een enkele klant, dus nemen we alleen de waarde die het meest voorkomt per klant (d.w.z. de favoriet). Om categorische kenmerken met een te hoge kardinaliteit te vermijden, houden we alleen de 5 meest voorkomende waarden voor elk kenmerk en vervangen we alle andere waarden door een \u201cAndere\u201d waarde.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27589%27%20height%3D%270%27%20viewBox%3D%270%200%20589%200%27%3E%3Crect%20width%3D%27589%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article11.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 589px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"589\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-8 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Productkenmerken<\/h3><\/div><div class=\"fusion-text fusion-text-20\"><p>Hoewel de eerste twee soorten kenmerken zeker nuttig zijn om ons te helpen de vraag te beantwoorden \u201cGaat een klant op mijn website kopen?\u201d, zijn ze niet specifiek genoeg als we het volgende moeten weten<strong class=\"hq jr\">\u00a0\u201c<\/strong><strong>Gaat de klant een specifiek product kopen?<\/strong><strong class=\"hq jr\">\u201d<\/strong>. Om deze vraag te helpen beantwoorden, hebben we productspecifieke functies gebouwd die alleen het product bevatten waarvoor we de aankoop proberen te voorspellen:<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27623%27%20height%3D%270%27%20viewBox%3D%270%200%20623%200%27%3E%3Crect%20width%3D%27623%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article12.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 623px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"623\" height=\"auto\" \/><div class=\"fusion-text fusion-text-21\"><p>Voor <em>Frequentie sinds laatste sessie met minstens \u00e9\u00e9n interactie met dit product,\u00a0<\/em>gebruiken we dezelfde formule als voor de\u00a0<em>Frequentie van sessies<\/em>\u00a0in de Algemene kenmerken. We kunnen echter gevallen hebben waarin er 0 sessies zijn met minstens \u00e9\u00e9n interactie met het product, in welk geval we vullen met 0. Dit is logisch vanuit zakelijk oogpunt omdat onze hoogst mogelijke waarde 1 is (als de klant sinds gisteren een sessie heeft gehad).<\/p>\n<\/div><div class=\"fusion-title title fusion-title-9 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Vergelijkbare producteigenschappen<\/h3><\/div><div class=\"fusion-text fusion-text-22\"><p>Naast het kijken naar de interactie van de klant met het product waarvoor we de waarschijnlijkheid van aankoop proberen te voorspellen, is het ook belangrijk om te weten dat de klant interactie had met<strong>\u00a0andere producten met vergelijkbare functie en prijsklasse\u00a0<\/strong>kan zeker nuttig zijn<strong class=\"hq jr\">\u00a0<\/strong>(d.w.z. vervangend product). Om deze reden hebben we een reeks Similar Product-functies toegevoegd die identiek zijn aan de Product-functies, behalve dat we ook gelijksoortige producten opnemen in de variabele reikwijdte. De vergelijkbare producten voor een bepaald product werden gedefinieerd met behulp van bedrijfsinvoer.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27608%27%20height%3D%270%27%20viewBox%3D%270%200%20608%200%27%3E%3Crect%20width%3D%27608%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article13.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 608px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"608\" height=\"auto\" \/><div class=\"fusion-text fusion-text-23\"><p>We hebben nu onze\u00a0<strong>kenmerk ontworpen dataset<\/strong>\u00a0waarop we ons machine-learningmodel kunnen trainen.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-10 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Het model trainen<\/h2><\/div><div class=\"fusion-text fusion-text-24\"><p>Aangezien we willen weten of een klant een bepaald product gaat kopen of niet, is dit een\u00a0<strong>binair classificatieprobleem.<\/strong><\/p>\n<p>Voor onze eerste iteratie deden we het volgende om onze machine learning dataset (1 rij per klant) te maken:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-4 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Bereken de <strong>functies die de sessies in een tijdsbestek van 3 maanden gebruiken<\/strong>\u00a0voor elke klant.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Bereken de\u00a0<strong>doel van de sessies in een tijdsbestek van 3 weken<\/strong>\u00a0volgend op het kenmerktijdvenster. Als er minstens \u00e9\u00e9n aankoop van het product is in het tijdsvenster, is Target gelijk aan 1 (gedefinieerd als Klasse 1), anders is Target gelijk aan 0 (gedefinieerd als Klasse 0).<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Splits de data tussen een Train set en een Test met 80 \/ 20 willekeurige splitsing.<\/div><\/li><\/ul><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27608%27%20height%3D%270%27%20viewBox%3D%270%200%20608%200%27%3E%3Crect%20width%3D%27608%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article14.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 608px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"608\" height=\"auto\" \/><div class=\"fusion-text fusion-text-25\"><p>Uit wat eerste data verkenning bleek echter al snel dat er een<strong>\u00a0sterk onevenwicht tussen klassen<\/strong>: Klasse 1 \/ Klasse 0 verhouding was meer dan 1:1000 en we hadden niet genoeg Klasse 1 klanten. Dit kan zeer problematisch zijn voor machine-learningmodellen.<\/p>\n<p>Om deze problemen op te lossen, hebben we onze aanpak op een aantal punten aangepast:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-5 fusion-checklist-default type-icons paddingList dark-text\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Wij <strong>de doelvariabele omgeschakeld<\/strong> van het maken van een\u00a0<strong>kopen<\/strong>\u00a0om een\u00a0<strong>Toevoegen aan winkelwagentje<\/strong>. Ons model verliest dus iets aan zakelijke betekenis, maar een toename van het volume van Klasse 1 compenseert dit ruimschoots.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Wij <strong>het model getraind op verschillende verschuivende vensters,<\/strong>elk van 3 maanden + 3 weken, in plaats van \u00e9\u00e9n enkele. Naast het verhogen van onze volumes van data, verbetert dit de generalisatiecapaciteit van het model door te trainen op verschillende perioden van het jaar waarin de klanten verschillend aankoopgedrag kunnen vertonen. Merk op dat hierdoor dezelfde klant meerdere keren voorkomt in de dataset (in verschillende periodes). Om te voorkomen dat data weglekt, zorgen we ervoor dat hij altijd of in de training of in de test dataset zit.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Wij <strong>onze Klasse 0 onderbemonsterd, zodat de Klasse 1\/Klasse 0-verhouding 1 is<\/strong>. Undersampling is een goede oplossing om het probleem van klassenonevenwichtigheid aan te pakken, in vergelijking met andere opties zoals oversampling of\u00a0<a class=\"bv kv\" href=\"https:\/\/machinelearningmastery.com\/smote-oversampling-for-imbalanced-classification\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">SMOTE<\/a>, omdat we het volume van Klasse 1 al aanzienlijk konden verhogen met de eerste twee wijzigingen.\u00a0<strong>Alleen de trainingsset wordt opnieuw gebalanceerd<\/strong>omdat we willen dat de testset dezelfde klassenratio's heeft als de toekomstige data waarop we het gaan testen. Merk op dat we met hogere ratio's hebben getest, zoals 5 of 10, maar dat 1 optimaal was voor de evaluatie van het model.<\/div><\/li><\/ul><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27549%27%20height%3D%270%27%20viewBox%3D%270%200%20549%200%27%3E%3Crect%20width%3D%27549%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 549px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"549\" height=\"auto\" \/><div class=\"fusion-text fusion-text-26\"><p>Met behulp van deze dataset hebben we met verschillende classificatiemodellen getest: Lineair model, Random Forest en XGboost, waarbij we de hyperparameters verfijnden met behulp van rasterzoeken, en uiteindelijk een<strong class=\"hq jr\">\u00a0<\/strong><strong><a class=\"bv kv\" href=\"https:\/\/xgboost.readthedocs.io\/en\/stable\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">XGboost-model<\/a><\/strong><strong class=\"hq jr\">.<\/strong><\/p>\n<\/div><div class=\"fusion-title title fusion-title-11 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Ons model evalueren<\/h2><\/div><div class=\"fusion-text fusion-text-27\"><p>Bij het evalueren van een propensity model zijn er twee hoofdtypen evaluaties die kunnen worden uitgevoerd:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-6 fusion-checklist-default type-icons paddingList dark-text\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>Backtest Evaluatie<\/strong><\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p><strong>Evaluatie Livetest<\/strong><\/p>\n<\/div><\/li><\/ul><div class=\"fusion-title title fusion-title-12 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Backtest Evaluatie<\/h3><\/div><div class=\"fusion-text fusion-text-28\"><p>Eerst hebben we\u00a0<strong>backtest evaluatie<\/strong>:<strong class=\"hq jr\">\u00a0<\/strong>hebben we ons model toegepast op <strong>verleden historisch data<\/strong>\u00a0en controleerde of ons model correct klanten identificeert die gaan toevoegen aan hun winkelwagentje. Aangezien we een binaire classificator gebruiken, produceert het model een waarschijnlijkheidsscore tussen 0 en 1 om klasse 1 (Toevoegen aan winkelwagentje) te zijn.<br \/>\n<a class=\"bv kv\" href=\"https:\/\/en.wikipedia.org\/wiki\/Confusion_matrix\" target=\"_blank\" rel=\"noopener ugc nofollow\">verwarringmatrix<\/a><strong class=\"hq jr\">\u00a0<\/strong>en bereken de\u00a0<strong><a class=\"bv kv\" href=\"https:\/\/en.wikipedia.org\/wiki\/Precision_and_recall\" target=\"_blank\" rel=\"noopener ugc nofollow\">precisie \/ terughalen<\/a>\u00a0<\/strong>(of hun gecombineerde vorm in de<strong><a class=\"bv kv\" href=\"https:\/\/en.wikipedia.org\/wiki\/F-score\" target=\"_blank\" rel=\"noopener ugc nofollow\">f1 score<\/a><\/strong>). Er zijn echter twee problemen met deze eenvoudige metriek:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-7 fusion-checklist-default type-icons paddingList dark-text\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Sommige kunnen\u00a0<strong>moeilijk te interpreteren<\/strong>\u00a0omdat de data-set onevenwichtig is\u00a0<em>(de precisiemetriek zal bijvoorbeeld over het algemeen erg laag zijn omdat we zo weinig Klasse 1 hebben)<\/em><\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Ze moeten beslissen over een\u00a0<strong>waarschijnlijkheidsdrempel\u00a0<\/strong>om onderscheid te maken tussen\u00a0<strong>Klasse 0 en 1<\/strong><\/div><\/li><\/ul><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27575%27%20height%3D%270%27%20viewBox%3D%270%200%20575%200%27%3E%3Crect%20width%3D%27575%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article2-1.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 575px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"575\" height=\"auto\" \/><div class=\"fusion-text fusion-text-29\"><p>Dus besloten we om twee meetgegevens te gebruiken die meer\u00a0<strong>interpreteerbaar<\/strong>:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-8 fusion-checklist-default type-icons paddingList dark-text\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>PR AUC: Gebied onder de curve van precisie door recall grafiek<\/strong>(<a href=\"https:\/\/neptune.ai\/blog\/f1-score-accuracy-roc-auc-pr-auc\" target=\"_blank\" rel=\"noopener ugc nofollow\">zie deze uitleg voor meer details<\/a>). In wezen stelt deze metriek ons in staat om een <strong>globale evaluatie op elke mogelijke drempel.<\/strong>Deze metriek is zeer geschikt voor onevenwichtige data-sets waarbij de prioriteit ligt bij het maximaliseren van precisie en recall op de minderheidsklasse: Klasse 1 (in tegenstelling tot zijn neefje de ROC AUC).<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>Uplift<\/strong>: we sorteren klanten op hun waarschijnlijkheidsscore en we verdelen onze resultaten in 20 ventielen. Uplift wordt gedefinieerd als de\u00a0<strong>Klasse 1-tarief in de top 5% \/ het Klasse 1-tarief in alle data-sets<\/strong>.\u00a0<em class=\"im\">Dus als we bijvoorbeeld 21 % Add to Cart in de top 5 % van de dataset vs 3 % Add to cart Rate in hele dataset hebben, hebben we een uplift van 7, wat betekent dat ons model 7 keer effectiever is dan een willekeurig model.<\/em><\/div><\/li><\/ul><div class=\"fusion-text fusion-text-30\"><p>Vooral de resultaten op deze punten waren erg positief,\u00a0<strong>Uplift <\/strong>was rond\u00a0<strong>13.5.<\/strong><\/p>\n<p>Backtest-evaluatie is een risicovrije methode voor een eerste beoordeling van een propensity model, maar het heeft verschillende beperkingen:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-9 fusion-checklist-default type-icons paddingList dark-text\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Aangezien dit alleen in het verleden gebeurt, wordt de uitvoer van het model niet echt gebruikt om <strong>invloed hebben op de mediabudgetstrategie.<\/strong><\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p>Met onze statistieken hebben we alleen beoordeeld of het model in staat was om correct klanten te identificeren die een toevoeging aan hun winkelwagentje zouden doen, maar we hebben niet beoordeeld <strong>hoe de identificatie van die klanten een verkoopstijging zou opleveren.<\/strong><\/p>\n<\/div><\/li><\/ul><div class=\"fusion-title title fusion-title-13 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Evaluatie Livetest<\/h3><\/div><div class=\"fusion-text fusion-text-31\"><p>Dus om een beter idee te krijgen van de zakelijke waarde van ons model, moeten we het volgende doen\u00a0<strong>evaluatie van live testen. Hier activeren we ons model en gebruiken we het om prioriteit te geven aan uitgaven voor reclamebudgetten:<\/strong><\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27554%27%20height%3D%270%27%20viewBox%3D%270%200%20554%200%27%3E%3Crect%20width%3D%27554%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/12\/antoine-aubay-article3.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 554px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"554\" height=\"auto\" \/><div class=\"fusion-text fusion-text-32\"><p>De resultaten die we tijdens de livetest hebben behaald, waren zeer solide:<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-10 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Vergeleken met een\u00a0<strong>eenvoudige, op regels gebaseerde aanpak<\/strong> voor evaluatiebereidheid,\u00a0<strong>de ROAS van ons model was +221 %<\/strong><\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">Verder hebben we onze prestaties ook vergeleken met een sterke concurrent in de vorm van<strong>\u00a0Google's kwaliteitsscore voor sessies<\/strong>: een score verstrekt door Google in de Google Analytics dataset, en in dat geval\u00a0<strong>ons model stond nog steeds op +73 % ROAS.<\/strong> Dit laat zien hoe een aangepaste ML-aanpak aanzienlijke zakelijke waarde kan opleveren.<\/div><\/li><\/ul><div class=\"fusion-title title fusion-title-14 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Conclusie<\/h2><\/div><div class=\"fusion-text fusion-text-33\"><p>Naast het behalen van solide prestaties, is een sterk bijkomend voordeel van onze aanpak dat onze feature engineering zeer generiek is. Bijna\u00a0<strong>geen van de feature engineering-stappen hoeft te worden aangepast<\/strong> om ons model toe te passen op een\u00a0<strong>verschillend landbereik of productbereik<\/strong>. Na ons eerste succes in de livetest konden we zelfs <strong>ons model op een zeer effici\u00ebnte manier uitrollen naar meerdere landen en producten.<\/strong><\/p>\n<p>Bedankt voor het lezen. Ik hoor graag uw opmerkingen over deze aanpak. Hebt u ooit propensity modellen gebouwd? Zo ja, wat deed u anders?<\/p>\n<p><em>Met dank aan Bruce Delattre, Rafa\u00eblle Aygalenq en C\u00e9dric Ly.<\/em><\/p>\n<\/div><\/div><\/div><\/div><\/article><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-5 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-4 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center\" style=\"--awb-padding-top:40px;--awb-padding-right:40px;--awb-padding-bottom:40px;--awb-padding-left:40px;--awb-overflow:hidden;--awb-bg-position:left center;--awb-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper lazyload fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-column fusion-column-has-bg-image\" data-bg-url=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\" data-bg=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-2 hover-type-none\"><img decoding=\"async\" width=\"72\" height=\"41\" title=\"middelgrote\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2772%27%20height%3D%2741%27%20viewBox%3D%270%200%2072%2041%27%3E%3Crect%20width%3D%2772%27%20height%3D%2741%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/medium.png\" alt class=\"lazyload img-responsive wp-image-60927\"\/><\/span><\/div><div class=\"fusion-title title fusion-title-15 fusion-sep-none fusion-title-center fusion-title-text fusion-title-size-three\" style=\"--awb-margin-top:20px;--awb-margin-bottom:0px;--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-center fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">Medium Blog bij Artefact.<\/h3><\/div><div class=\"fusion-text fusion-text-34\" style=\"--awb-content-alignment:center;\"><p>Dit artikel werd oorspronkelijk gepubliceerd op <strong>Medium.com<\/strong>.<br \/>\nVolg ons op ons medium Blog !<\/p>\n<\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat button-medium button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type\" target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/scoring-customer-propensity-using-machine-learning-models-on-google-analytics-data-ba1126469c1f\"><span class=\"fusion-button-text awb-button__text awb-button__text--default\">Lees ons artikel<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>Een diepgaand onderzoek naar hoe wij geavanceerde aangepaste modellen voor machinaal leren hebben gebouwd om de geneigdheid van klanten om een product te kopen in te schatten met behulp van Google Analytics data.<\/p>","protected":false},"featured_media":68690,"parent":0,"template":"","meta":{"_acf_changed":false,"ep_exclude_from_search":false},"blog-category":[21939],"blog-language":[2991],"class_list":["post-65530","blog","type-blog","status-publish","has-post-thumbnail","hentry","blog-category-medium","blog-language-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/blog\/65530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/types\/blog"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/media\/68690"}],"wp:attachment":[{"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/media?parent=65530"}],"wp:term":[{"taxonomy":"blog-category","embeddable":true,"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/blog-category?post=65530"},{"taxonomy":"blog-language","embeddable":true,"href":"https:\/\/www.artefact.com\/nl\/wp-json\/wp\/v2\/blog-language?post=65530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}