{"id":845,"date":"2020-12-22T19:32:31","date_gmt":"2020-12-22T19:32:31","guid":{"rendered":"http:\/\/puneetkhosla.com\/?p=845"},"modified":"2021-04-14T05:13:25","modified_gmt":"2021-04-14T05:13:25","slug":"build-numeric-predictions-with-einstein-prediction-builder","status":"publish","type":"post","link":"https:\/\/puneetkhosla.com\/?p=845","title":{"rendered":"Build Numeric Predictions with Einstein Prediction Builder"},"content":{"rendered":"\n<p>In my last blog <a href=\"https:\/\/puneetkhosla.com\/?p=805\">Build Predictions with Einstein Prediction Builder<\/a>, I talked about building predictions for a Yes \/ No response. We will now Build an Einstein Prediction with Numeric outcome and going through some other options available.<\/p>\n\n\n\n<p>In this prediction, we will only focus on Strategic Accounts in my org and build prediction for those accounts only.<\/p>\n\n\n\n<p>1. Click on the&nbsp;<strong><span class=\"has-inline-color has-bright-blue-color\">New Prediction<\/span><\/strong>&nbsp;Button on the Einstein Prediction Builder.<\/p>\n\n\n\n<p>2. Give your Prediction a name (and api). I kept the name as&nbsp;<strong>\u201c<span class=\"has-inline-color has-bright-blue-color\">Case Escalation Probability<\/span>\u201d<\/strong><\/p>\n\n\n\n<p>3. We will now define a &#8220;<span class=\"has-inline-color has-bright-blue-color\"><strong>Segment<\/strong>&#8221; <\/span>. Segment tells Einstein which records we need to consider as the source of truth and which ones need the prediction to run. eg: If we are pizza delivery company and we want to know the probability of a pizza getting delayed when getting home delivered, then we don&#8217;t want the prediction to run for customers with Take Away orders.<\/p>\n\n\n\n<p>4. In our use case, we created a formula field on Case for Strategic Accounts and thus chose &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">Yes, focus on a segment<\/span><\/strong>&#8221; in &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">Define Segment&#8221;<\/span><\/strong> section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB19-1024x441.png\" alt=\"\" class=\"wp-image-846\" width=\"590\" height=\"253\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB19-1024x441.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB19-300x129.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB19-768x331.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB19-1200x517.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB19.png 1438w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>5. We now need to tell whether this would be a &#8220;Yes\/No&#8221; answer or we expect a &#8220;Number&#8221; value. Since we are working on a probability, we would select a Number field.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB20.png\" alt=\"\" class=\"wp-image-848\" width=\"590\" height=\"379\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB20.png 759w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB20-300x192.png 300w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>6. In the next screen, we are presented with the option to choose &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">Example Set<\/span><\/strong>&#8221; and a &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">Prediction Set<\/span><\/strong>&#8220;.<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">Example Set<\/span><\/strong> are set of records which act as source of data. They are the ones who already have relevant values in them, based on which the predictions should be done. In our example, it would be cases (of Strategic Accounts) which are closed as they provide a definitive probability of escalation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB21-1.png\" alt=\"\" class=\"wp-image-852\" width=\"590\" height=\"362\"\/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">Prediction Set<\/span><\/strong> are set of records where we want to run the prediction. In our example, our prediction is to run for cases which are open (of Strategic Accounts). For our use case, we could have also used the option to Score only records that aren&#8217;t in the example set.<\/p>\n\n\n\n<p>Please Note Strategic Accounts are based on Data Segmentation done in Step 4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB22.png\" alt=\"\" class=\"wp-image-851\" width=\"590\" height=\"233\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB22.png 912w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB22-300x119.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB22-768x305.png 768w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>7. Select all the fields for this use case. In my next blog we will reduce the number of fields selected to see the difference in the quality of predictions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB23.png\" alt=\"\" class=\"wp-image-853\" width=\"590\" height=\"271\"\/><\/figure>\n\n\n\n<p>8. We now give the name of the field where we want to save the predictions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB24.png\" alt=\"\" class=\"wp-image-854\" width=\"590\" height=\"320\"\/><\/figure>\n\n\n\n<p>9. Once we have gone through all the Einstein Prediction Builder Screens, we have to wait for predictions to be built. Einstein can take some time to process the data and build the predictions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB25-1024x351.png\" alt=\"\" class=\"wp-image-855\" width=\"590\" height=\"199\"\/><\/figure>\n\n\n\n<p>10. Once the Status changes for &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">Ready for Review<\/span><\/strong>&#8220;, it is suggested to &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">View  Scorecard<\/span><\/strong>&#8221; before Enabling.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB26-1024x167.png\" alt=\"\" class=\"wp-image-856\" width=\"590\" height=\"96\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB26-1024x167.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB26-300x49.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB26-768x125.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB26-1200x196.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB26.png 1304w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>11. Scorecard gives the score of prediction and the factors influencing it. As we can see, in our example IsEscalated field has a major influence on the prediction.<\/p>\n\n\n\n<p>Prediction Quality is Good (in my upcoming blogs, we will work on improving the prediction quality).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB27-1024x457.png\" alt=\"\" class=\"wp-image-857\" width=\"590\" height=\"263\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB27-1024x457.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB27-300x134.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB27-768x343.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB27-1200x536.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB27.png 1426w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>12. Now if we add the field on Case List View, we can see the result. As you can see Predictions only appear for Strategic Accounts (as per segmentation)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29-1024x170.png\" alt=\"\" class=\"wp-image-859\" width=\"590\" height=\"98\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29-1024x170.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29-300x50.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29-768x127.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29-1536x255.png 1536w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29-1200x199.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/12\/EPB29.png 1567w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>So we have seen how Einstein Prediction Builder works and the impact of settings. In my upcoming blogs we will deep dive into ways of improving the predictions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last blog Build Predictions with Einstein Prediction Builder, I talked about building predictions for a Yes \/ No response. We will now Build an Einstein Prediction with Numeric outcome and going through some other options available. In this prediction, we will only focus on Strategic Accounts in my org and build prediction for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7],"tags":[14,11,13,18,16],"class_list":["post-845","post","type-post","status-publish","format-standard","hentry","category-einstein","tag-ai","tag-einstein","tag-einstein-discovery","tag-einstein-prediction-builder","tag-salesforce"],"_links":{"self":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts\/845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=845"}],"version-history":[{"count":10,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts\/845\/revisions"}],"predecessor-version":[{"id":923,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts\/845\/revisions\/923"}],"wp:attachment":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}