{"id":7469,"date":"2023-09-12T16:29:46","date_gmt":"2023-09-13T00:29:46","guid":{"rendered":"https:\/\/live-cometml.pantheonsite.io\/?p=7469"},"modified":"2025-04-24T17:14:06","modified_gmt":"2025-04-24T17:14:06","slug":"exploratory-data-analysis-logging-seaborn-visualizations-with-comet","status":"publish","type":"post","link":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/","title":{"rendered":"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet"},"content":{"rendered":"\n<link rel=\"canonical\" href=\"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\">\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<figure class=\"lw lx ly lz ma mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg\" alt=\"\" width=\"700\" height=\"466\"><\/figure><div class=\"lt lu lv\"><picture><\/picture><\/div>\n<\/div><figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: <a class=\"af mn\" href=\"https:\/\/www.pexels.com\/photo\/planet-earth-220201\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Photo by Pixabay<\/a><\/figcaption><\/figure>\n<h1 id=\"1073\" class=\"mo mp fo be mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl bj\" data-selectable-paragraph=\"\">Introduction<\/h1>\n<p id=\"898e\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\"><a class=\"af mn\" href=\"https:\/\/heartbeat.comet.ml\/exploratory-data-analysis-eda-for-categorical-data-870b37a79b65\" target=\"_blank\" rel=\"noopener ugc nofollow\">Exploratory Data Analysis<\/a> (EDA) is one of the primary tasks a Data Scientist performs when starting to work on a new data set. The process informs us about the distribution or the relationship between the variables, identifies missing and unclean data, and identifies outliers. This helps in designing and upgrading data pipelines for the pre-processing of the inflowing data.<\/p>\n<p id=\"9bf4\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">There are various Python libraries that support both statistical and scientific analysis and representation of data. This makes Python one of the most preferred languages for EDA. In this post, you will learn how to use the Seaborn library for EDA and log the charts thus generated to Comet for sharing and collaborating with the team as well as making report generation a cakewalk.<\/p>\n<h1 id=\"759c\" class=\"mo mp fo be mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl bj\" data-selectable-paragraph=\"\">Set up Comet Project<\/h1>\n<p id=\"1eaf\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">Log on to <a class=\"af mn\" href=\"\/signup?utm_source=heartbeat&amp;utm_medium=referral&amp;utm_campaign=AMS_US_EN_SNUP_heartbeat_CTA\" target=\"_blank\" rel=\"noopener ugc nofollow\">Comet.com<\/a> and click on \u201cSign Up\u201d on the top right-hand side.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*XzHvSnKJU3bBMK2XwlYhtw.png\" alt=\"\" width=\"700\" height=\"405\"><\/figure><div class=\"lt lu oo\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*XzHvSnKJU3bBMK2XwlYhtw.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*XzHvSnKJU3bBMK2XwlYhtw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*XzHvSnKJU3bBMK2XwlYhtw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*XzHvSnKJU3bBMK2XwlYhtw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*XzHvSnKJU3bBMK2XwlYhtw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*XzHvSnKJU3bBMK2XwlYhtw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*XzHvSnKJU3bBMK2XwlYhtw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*XzHvSnKJU3bBMK2XwlYhtw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<p id=\"7258\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Add your details or sign up using a GitHub account.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*UvxBnQ9A3PaCCNUc4_BE-g.png\" alt=\"\" width=\"700\" height=\"407\"><\/figure><div class=\"lt lu ou\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*UvxBnQ9A3PaCCNUc4_BE-g.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<p id=\"8e07\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Click on \u201c+ New Project\u201d to create a new project. This is like a directory for all your experiments.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*CttkUatJVcf3YtOZSS7y0w.png\" alt=\"\" width=\"700\" height=\"407\"><\/figure><div class=\"lt lu ov\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*CttkUatJVcf3YtOZSS7y0w.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*CttkUatJVcf3YtOZSS7y0w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*CttkUatJVcf3YtOZSS7y0w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*CttkUatJVcf3YtOZSS7y0w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*CttkUatJVcf3YtOZSS7y0w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*CttkUatJVcf3YtOZSS7y0w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*CttkUatJVcf3YtOZSS7y0w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*CttkUatJVcf3YtOZSS7y0w.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<p id=\"4b98\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Add project name, description, and visibility settings. The settings for this demo are shown in the screenshot below.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*7zl7VpYPmeHt1dHdtuGAPg.png\" alt=\"\" width=\"700\" height=\"406\"><\/figure><div class=\"lt lu ov\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*7zl7VpYPmeHt1dHdtuGAPg.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*7zl7VpYPmeHt1dHdtuGAPg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*7zl7VpYPmeHt1dHdtuGAPg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*7zl7VpYPmeHt1dHdtuGAPg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*7zl7VpYPmeHt1dHdtuGAPg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*7zl7VpYPmeHt1dHdtuGAPg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*7zl7VpYPmeHt1dHdtuGAPg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*7zl7VpYPmeHt1dHdtuGAPg.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<p id=\"34e5\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Clicking on \u201cQuick Start Guide\u201d would help you with the setup instructions and the API key.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*KlT-ZwD54Iu4KfzqoPsJEg.png\" alt=\"\" width=\"700\" height=\"408\"><\/figure><div class=\"lt lu ou\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*KlT-ZwD54Iu4KfzqoPsJEg.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<p id=\"d230\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">On the \u201cGet Started with Comet\u201d section click on Python. This will display the terminal commands to install the Comet library on your local Python environment.<\/p>\n<p id=\"5131\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">You can either choose to create a new environment or use the base environment for the installation.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*A6j4jCVHss3IPmRaouY5YA.png\" alt=\"\" width=\"700\" height=\"311\"><\/figure><div class=\"lt lu ou\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*A6j4jCVHss3IPmRaouY5YA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*A6j4jCVHss3IPmRaouY5YA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*A6j4jCVHss3IPmRaouY5YA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*A6j4jCVHss3IPmRaouY5YA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*A6j4jCVHss3IPmRaouY5YA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*A6j4jCVHss3IPmRaouY5YA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*A6j4jCVHss3IPmRaouY5YA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*A6j4jCVHss3IPmRaouY5YA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<p id=\"0fc0\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Run the below command in your terminal.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"c185\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">pip install comet_ml<\/span><\/pre>\n<p id=\"350a\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Before writing the code, add the following code at the start of your Python script (.py file)or Jupyter notebook (.ipynb file).<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"bf3f\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">from comet_ml import Experiment<\/span><span id=\"fc4a\" class=\"pb mp fo ox b ho pf pd l ie pe\" data-selectable-paragraph=\"\">experiment = Experiment(\n    api_key=\"add your api key here\",\n    project_name=\"add your project name here\",\n    workspace=\"add your workspace name here\",\n)<\/span><\/pre>\n<p id=\"d7a8\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">You can find the above code snipped directly from the \u201cGetting Started with Comet\u201d page. You can confirm if the Comet platform is listening to your experiments on the same page. Please refer to the screenshot below.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*EvhDLG-BgcrvXd4i_rUlRQ.png\" alt=\"\" width=\"700\" height=\"166\"><\/figure><div class=\"lt lu pg\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*EvhDLG-BgcrvXd4i_rUlRQ.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: comet.com<\/figcaption>\n<\/figure>\n<h1 id=\"5d77\" class=\"mo mp fo be mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl bj\" data-selectable-paragraph=\"\">Exploratory Data Analysis<\/h1>\n<p id=\"b4f7\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">For the purpose of this demo, we\u2019ll be using <a class=\"af mn\" href=\"https:\/\/www.kaggle.com\/competitions\/house-prices-advanced-regression-techniques\/data\" target=\"_blank\" rel=\"noopener ugc nofollow\">House Prices \u2014 Advanced Regression Techniques<\/a> dataset from <a class=\"af mn\" href=\"https:\/\/www.kaggle.com\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Kaggle<\/a>. It&#8217;s a regression problem where the target variable is the house price and house attributes like area, structure, and amenities nearby constitute the independent variables. Therefore, we\u2019ll analyze the relationship between independent variables and the house&#8217;s sale price. Let\u2019s go!<\/p>\n<p id=\"a2a9\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\"><strong class=\"be ph\">Import Required Libraries<\/strong><\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"0668\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">import pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns<\/span><\/pre>\n<p id=\"2ca5\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\"><strong class=\"be ph\">Read CSV data and view the top five rows.<\/strong><\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"80d6\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">train = pd.read_csv('train.csv')\ntrain.head()<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*6smw7kQlqNUqSGrshC_pdw.png\" alt=\"\" width=\"700\" height=\"129\"><\/figure><div class=\"lt lu pi\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*6smw7kQlqNUqSGrshC_pdw.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*6smw7kQlqNUqSGrshC_pdw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*6smw7kQlqNUqSGrshC_pdw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*6smw7kQlqNUqSGrshC_pdw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*6smw7kQlqNUqSGrshC_pdw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*6smw7kQlqNUqSGrshC_pdw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*6smw7kQlqNUqSGrshC_pdw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*6smw7kQlqNUqSGrshC_pdw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"674e\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">You can see a bunch of attributes relating to the zone where the house belongs or the square foot area and the approach road. Let\u2019s get the summary statistics by:<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"6189\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">train.describe().T<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:591\/1*vvyYWQAtSAkawYiszVKycA.png\" alt=\"\" width=\"591\" height=\"929\"><\/figure><div class=\"lt lu pj\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1182\/format:webp\/1*vvyYWQAtSAkawYiszVKycA.png 1182w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 591px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*vvyYWQAtSAkawYiszVKycA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*vvyYWQAtSAkawYiszVKycA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*vvyYWQAtSAkawYiszVKycA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*vvyYWQAtSAkawYiszVKycA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*vvyYWQAtSAkawYiszVKycA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*vvyYWQAtSAkawYiszVKycA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1182\/1*vvyYWQAtSAkawYiszVKycA.png 1182w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 591px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"a34d\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\"><strong class=\"be ph\">Plot Sales Price distribution<\/strong><\/p>\n<p id=\"2f41\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Set the figure size as per your need, then plot a distribution, and log your chart to the experiment in your Comet project using log_figure(). The distribution plot shows the distribution of Sales Prices with respect to different zones.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"e454\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">plt.figure(figsize=(15,10))\nfig = sns.histplot(data = train, x = \"SalePrice\", hue=\"MSZoning\")\nexperiment.log_figure(figure_name = \"Sale Price Distribution\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*0HWaV18cHncl3iFzWvaIWA.png\" alt=\"\" width=\"700\" height=\"463\"><\/figure><div class=\"lt lu pk\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*0HWaV18cHncl3iFzWvaIWA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*0HWaV18cHncl3iFzWvaIWA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*0HWaV18cHncl3iFzWvaIWA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*0HWaV18cHncl3iFzWvaIWA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*0HWaV18cHncl3iFzWvaIWA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*0HWaV18cHncl3iFzWvaIWA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*0HWaV18cHncl3iFzWvaIWA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*0HWaV18cHncl3iFzWvaIWA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"4a00\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The distribution has a positive skew. You can take a log transform to correct the skew. Code for plotting and logging the unskewed distribution is as under:<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"824c\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">train['log_sales_price'] = np.log(train['SalePrice'])\nplt.figure(figsize=(15,10))\nsns.histplot(train, x=\"log_sales_price\", hue=\"MSZoning\")\nplt.show()<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*U0xVfN-90ENty-yKpR9qpQ.png\" alt=\"\" width=\"700\" height=\"465\"><\/figure><div class=\"lt lu pk\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*U0xVfN-90ENty-yKpR9qpQ.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*U0xVfN-90ENty-yKpR9qpQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*U0xVfN-90ENty-yKpR9qpQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*U0xVfN-90ENty-yKpR9qpQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*U0xVfN-90ENty-yKpR9qpQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*U0xVfN-90ENty-yKpR9qpQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*U0xVfN-90ENty-yKpR9qpQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*U0xVfN-90ENty-yKpR9qpQ.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"d793\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Better! Getting the numeric value of Skew and Kurtosis is as easy as below:<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"e059\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">print(\"Skewness: %f\" % train['SalePrice'].skew())\nprint(\"Kurtosis: %f\" % train['SalePrice'].kurt())<\/span><\/pre>\n<p id=\"a02d\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The Skew value is 1.88 and Kurtosis is 6.54, representing a positive Skew. Similarly, we can plot Sales Price Distribution with other variables.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"1a55\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">for i in train.columns:\n    if len(train[i].value_counts()) &lt; 5 and len(train[i].value_counts()) &gt; 1:\n        fig = sns.displot(train, x=\"SalePrice\", kde=True, hue=i)\n        plt.title('Sales Price Distribution by '+i)\n        experiment.log_figure(figure_name = \"Pairplot distribution and Scatterplots\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<p id=\"22eb\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Using the above filters we get 15 charts for Sales Price Distribution. Showing below three charts for reference.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:413\/1*UrWVuxPzfWv78J7_M0FtBQ.png\" alt=\"\" width=\"413\" height=\"366\"><\/figure><div class=\"lt lu pl\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:826\/format:webp\/1*UrWVuxPzfWv78J7_M0FtBQ.png 826w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 413px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*UrWVuxPzfWv78J7_M0FtBQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*UrWVuxPzfWv78J7_M0FtBQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*UrWVuxPzfWv78J7_M0FtBQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*UrWVuxPzfWv78J7_M0FtBQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*UrWVuxPzfWv78J7_M0FtBQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*UrWVuxPzfWv78J7_M0FtBQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:826\/1*UrWVuxPzfWv78J7_M0FtBQ.png 826w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 413px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"20ab\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">IR1 lot shape is found to be a popular choice and commands higher Sales Prices as compared to Regular lot shapes. It also has a long right tail representing a positive skew.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:415\/1*Xp6cSuFlwmk5KwHMh0OjXg.png\" alt=\"\" width=\"415\" height=\"368\"><\/figure><div class=\"lt lu pm\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:830\/format:webp\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 830w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 415px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:830\/1*Xp6cSuFlwmk5KwHMh0OjXg.png 830w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 415px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"e8d5\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Exterior material quality also seems to be a deciding factor for house Sales Price showing a sharp difference in the distribution across its values.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:432\/1*jHQGMJ8uocjQM3x_aqeeVg.png\" alt=\"\" width=\"432\" height=\"368\"><\/figure><div class=\"lt lu pn\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:864\/format:webp\/1*jHQGMJ8uocjQM3x_aqeeVg.png 864w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 432px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*jHQGMJ8uocjQM3x_aqeeVg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*jHQGMJ8uocjQM3x_aqeeVg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*jHQGMJ8uocjQM3x_aqeeVg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*jHQGMJ8uocjQM3x_aqeeVg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*jHQGMJ8uocjQM3x_aqeeVg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*jHQGMJ8uocjQM3x_aqeeVg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:864\/1*jHQGMJ8uocjQM3x_aqeeVg.png 864w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 432px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"8c15\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Basement Full Bathrooms seems to be a weaker deciding factor for housing price.<\/p>\n<h2 id=\"707a\" class=\"pb mp fo be mq po pp pq mu pr ps pt my nw pu pv pw oa px py pz oe qa qb qc qd bj\" data-selectable-paragraph=\"\">Plot Sales Price vs. independent variables<\/h2>\n<p id=\"435a\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">Now let&#8217;s look at the relationship of price w.r.t. continuous variables using a scatterplot.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"63e8\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">plt.figure(figsize=(15,10))\nfig = sns.scatterplot(data=train, x='GrLivArea', y='SalePrice', hue = \"MSZoning\", palette=\"deep\", style=\"Street\")\nexperiment.log_figure(figure_name = \"Complete Data\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*NdnTwyBFqS3-vx2DFBpy8A.png\" alt=\"\" width=\"700\" height=\"454\"><\/figure><div class=\"lt lu qe\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*NdnTwyBFqS3-vx2DFBpy8A.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*NdnTwyBFqS3-vx2DFBpy8A.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*NdnTwyBFqS3-vx2DFBpy8A.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*NdnTwyBFqS3-vx2DFBpy8A.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*NdnTwyBFqS3-vx2DFBpy8A.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*NdnTwyBFqS3-vx2DFBpy8A.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*NdnTwyBFqS3-vx2DFBpy8A.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*NdnTwyBFqS3-vx2DFBpy8A.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"5a78\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The relationship seems to be a non-linear one with Sales Prices variance increasing with an increase in GrLivArea. Let\u2019s bring the two on a logarithmic scale and re-look at the relationship.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"f086\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">train['log_GrLivArea'] = np.log(train['GrLivArea'])\ntrain['log_SalePrice'] = np.log(train['SalePrice'])\nplt.figure(figsize=(15,10))\nplt.title(\"Log transform of Sales Price vs Ground Floor Living Area\")\nfig = sns.scatterplot(data=train, x='log_GrLivArea', y='log_SalePrice', hue = \"MSZoning\", palette=\"deep\", style=\"Street\")\nexperiment.log_figure(figure_name = \"Log transform of Sales Price vs Ground Floor Living Area\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*1rNw4aR8r9OuITqksLg0-w.png\" alt=\"\" width=\"700\" height=\"474\"><\/figure><div class=\"lt lu qf\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*1rNw4aR8r9OuITqksLg0-w.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*1rNw4aR8r9OuITqksLg0-w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*1rNw4aR8r9OuITqksLg0-w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*1rNw4aR8r9OuITqksLg0-w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*1rNw4aR8r9OuITqksLg0-w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*1rNw4aR8r9OuITqksLg0-w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*1rNw4aR8r9OuITqksLg0-w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*1rNw4aR8r9OuITqksLg0-w.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"34fa\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Ah, much better! A candidate for Linear Regression.<\/p>\n<p id=\"b481\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Let\u2019s hunt for the next best predictor starting with the basement area.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"8e5c\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">plt.figure(figsize=(15,10))\nplt.title(\"Sales Price vs Basement Area\")\nfig = sns.scatterplot(data=train, x='TotalBsmtSF', y='SalePrice', hue = \"MSZoning\", palette=\"deep\", style=\"Street\")\nexperiment.log_figure(figure_name = \"Sales Price vs Basement Area\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*iNL1RzQcUZpYL-VX0dqoPw.png\" alt=\"\" width=\"700\" height=\"465\"><\/figure><div class=\"lt lu qe\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*iNL1RzQcUZpYL-VX0dqoPw.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*iNL1RzQcUZpYL-VX0dqoPw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*iNL1RzQcUZpYL-VX0dqoPw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*iNL1RzQcUZpYL-VX0dqoPw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*iNL1RzQcUZpYL-VX0dqoPw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*iNL1RzQcUZpYL-VX0dqoPw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*iNL1RzQcUZpYL-VX0dqoPw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*iNL1RzQcUZpYL-VX0dqoPw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"27d2\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The scatterplot shows an interesting positive relationship and an outlier at the extreme right bottom. <a class=\"af mn\" href=\"https:\/\/medium.com\/cometheartbeat\/techniques-to-deal-with-outliers-in-the-data-3f18f1575984\" rel=\"noopener\">Outlier identification<\/a> and treatment is an essential part of a machine learning project.<\/p>\n<p id=\"9b09\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Charting Sales prices with Overall Quality shows an increasingly positive relationship. Here OverallQual is an ordinal variable thus the scatterplot looks like a queue of pillars. Please refer to the code and output below.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"dc34\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">plt.figure(figsize=(15,10))\nplt.title(\"Sales Price vs Overall Quality\")\nfig = sns.scatterplot(data=train, x='OverallQual', y='SalePrice', hue = \"MSZoning\", palette=\"deep\", style=\"Street\")\nexperiment.log_figure(figure_name = \"Sales Price vs Overall Quality\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*EbGHf4lzQEg2wUC97A7UDQ.png\" alt=\"\" width=\"700\" height=\"465\"><\/figure><div class=\"lt lu qe\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*EbGHf4lzQEg2wUC97A7UDQ.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*EbGHf4lzQEg2wUC97A7UDQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*EbGHf4lzQEg2wUC97A7UDQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*EbGHf4lzQEg2wUC97A7UDQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*EbGHf4lzQEg2wUC97A7UDQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*EbGHf4lzQEg2wUC97A7UDQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*EbGHf4lzQEg2wUC97A7UDQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*EbGHf4lzQEg2wUC97A7UDQ.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"01c5\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">We can also look at the distribution of a variable using a boxplot. A boxplot is a standard way to identify quartiles and outliers. Below is a plot of Sales Prices with the Year Built.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"4526\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">plt.figure(figsize=(25,15))\nplt.title(\"Sales Price vs Year Built\")\nfig = sns.boxplot(data=train, x='YearBuilt', y='SalePrice')\nplt.xticks(rotation=75)\nexperiment.log_figure(figure_name = \"Sales Price vs Year Built\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*drgObjn59hxryykAFj9x0Q.png\" alt=\"\" width=\"700\" height=\"426\"><\/figure><div class=\"lt lu qg\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*drgObjn59hxryykAFj9x0Q.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*drgObjn59hxryykAFj9x0Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*drgObjn59hxryykAFj9x0Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*drgObjn59hxryykAFj9x0Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*drgObjn59hxryykAFj9x0Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*drgObjn59hxryykAFj9x0Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*drgObjn59hxryykAFj9x0Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*drgObjn59hxryykAFj9x0Q.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"d5a9\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The plots show Sales prices are higher for newly built and antique houses.<\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<blockquote class=\"qp\"><p id=\"ecde\" class=\"qq qr fo be qs qt qu qv qw qx qy oi dv\" data-selectable-paragraph=\"\">Isolating difficult data samples? Comet can do that. <a class=\"af mn\" href=\"https:\/\/www.comet.com\/site\/blog\/debugging-your-machine-learning-models-with-comet-artifacts\/?utm_source=heartbeat&amp;utm_medium=referral&amp;utm_campaign=AMS_US_EN_AWA_heartbeat_CTA\" target=\"_blank\" rel=\"noopener ugc nofollow\">Learn more with our PetCam scenario and discover Comet Artifacts.<\/a><\/p><\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<h2 id=\"223d\" class=\"pb mp fo be mq po pp pq mu pr ps pt my nw pu pv pw oa px py pz oe qa qb qc qd bj\" data-selectable-paragraph=\"\">Correlation Heatmaps<\/h2>\n<p id=\"7e6c\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">Numeric variables are blessed with metrics like correlation which represents whether two quantities are related (positively or negatively) or unrelated.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"15e2\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">plt.figure(figsize=(35,20))\nplt.title(\"Correlation Heat Map\")\nfig = sns.heatmap(train.corr(), annot=True)\nexperiment.log_figure(figure_name = \"Correlation Heat Map\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*XxrAeZYHu2M7CKPWEpVt4A.png\" alt=\"\" width=\"700\" height=\"457\"><\/figure><div class=\"lt lu qz\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*XxrAeZYHu2M7CKPWEpVt4A.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*XxrAeZYHu2M7CKPWEpVt4A.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*XxrAeZYHu2M7CKPWEpVt4A.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*XxrAeZYHu2M7CKPWEpVt4A.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*XxrAeZYHu2M7CKPWEpVt4A.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*XxrAeZYHu2M7CKPWEpVt4A.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*XxrAeZYHu2M7CKPWEpVt4A.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*XxrAeZYHu2M7CKPWEpVt4A.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"cd53\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">A <a class=\"af mn\" href=\"https:\/\/heartbeat.comet.ml\/seaborn-heatmaps-13-ways-to-customize-correlation-matrix-visualizations-f1c49c816f07\" target=\"_blank\" rel=\"noopener ugc nofollow\">heatmap<\/a> is a common way to represent correlations and uses the correlation matrix function (.corr()) from the Pandas library. The above heatmap is a bit overwhelming because of the number of variables.<\/p>\n<p id=\"2ffe\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Let\u2019s narrow our search to highly correlated variables.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"30cf\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">cols = list(train.corr().nlargest(5, 'SalePrice')['SalePrice'].index) + list(train.corr().nsmallest(5, 'SalePrice')['SalePrice'].index)\nplt.figure(figsize=(15,10))\nplt.title(\"Top 5 highly correlated variables - Correlation Heat Map\")\nfig = sns.heatmap(train[cols].corr(), annot=True)\nexperiment.log_figure(figure_name = \"Top 5 highly correlated variables - Correlation Heat Map\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*eOzyGYqrfq_tPxxJoDPBIg.png\" alt=\"\" width=\"700\" height=\"536\"><\/figure><div class=\"lt lu ra\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*eOzyGYqrfq_tPxxJoDPBIg.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*eOzyGYqrfq_tPxxJoDPBIg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*eOzyGYqrfq_tPxxJoDPBIg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*eOzyGYqrfq_tPxxJoDPBIg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*eOzyGYqrfq_tPxxJoDPBIg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*eOzyGYqrfq_tPxxJoDPBIg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*eOzyGYqrfq_tPxxJoDPBIg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*eOzyGYqrfq_tPxxJoDPBIg.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<blockquote class=\"rb rc rd\"><p id=\"7339\" class=\"nm nn re be b no oj nq nr ns ok nu nv rf ol ny nz rg om oc od rh on og oh oi fh bj\" data-selectable-paragraph=\"\">Pick the top five positively and negatively correlated variables by calling the <strong class=\"be ph\">nlargest() and nsmallest() <\/strong>function respectively on the correlation matrix.<\/p><\/blockquote>\n<p id=\"0b4a\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Overall Quality and Ground Living Area are highly correlated to the price of the house.<\/p>\n<h2 id=\"1aac\" class=\"pb mp fo be mq po pp pq mu pr ps pt my nw pu pv pw oa px py pz oe qa qb qc qd bj\" data-selectable-paragraph=\"\">Pairplots<\/h2>\n<p id=\"da7d\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">You can also identify the relationship between independent variables in a single shot using the pair plot. The diagonal in a pair plot shows a histogram whereas the rest of the cells represent scatterplots.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"6906\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">cols = ['SalePrice', 'OverallQual', 'GrLivArea', 'GarageCars', 'TotalBsmtSF', 'FullBath', 'YearBuilt']\nplt.figure(figsize=(15,10))\nfig = sns.pairplot(train[cols])\nplt.title(\"Pairplot distribution and Scatterplots\")\nexperiment.log_figure(figure_name = \"Pairplot distribution and Scatterplots\", figure=fig.figure, overwrite=False)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png\" alt=\"\" width=\"700\" height=\"683\"><\/figure><div class=\"lt lu ri\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*v9LIQW-nVOpP5B9bO-Xw6Q.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"7b4e\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Apart from the earlier identified relationships, GrLivArea and TotalBsmtSF have a weak positive relationship and something worth investigating further during modeling.<\/p>\n<h2 id=\"8f82\" class=\"pb mp fo be mq po pp pq mu pr ps pt my nw pu pv pw oa px py pz oe qa qb qc qd bj\" data-selectable-paragraph=\"\">Identifying Missing Values<\/h2>\n<p id=\"cb7b\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">It\u2019s important to identify and treat missing values while building an ML solution. You would not want your solution to be dependent on variables with high missing values as it could lead to poor predictions in production.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"647c\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">total = train.isnull().sum().sort_values(ascending=False)\npercent = (train.isnull().sum()\/train.isnull().count()).sort_values(ascending=False)\nmissing_data = pd.concat([total, percent], axis=1, keys=['Total', 'Percent'])\nmissing_data.head(20)<\/span><\/pre>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:201\/1*104t8kYqPH4vEt_H2mki5Q.png\" alt=\"\" width=\"201\" height=\"564\"><\/figure><div class=\"lt lu rj\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:402\/format:webp\/1*104t8kYqPH4vEt_H2mki5Q.png 402w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 201px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*104t8kYqPH4vEt_H2mki5Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*104t8kYqPH4vEt_H2mki5Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*104t8kYqPH4vEt_H2mki5Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*104t8kYqPH4vEt_H2mki5Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*104t8kYqPH4vEt_H2mki5Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*104t8kYqPH4vEt_H2mki5Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:402\/1*104t8kYqPH4vEt_H2mki5Q.png 402w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 201px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"b7f4\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The above code identifies variables with one or more missing values and the below code removes the columns with missing values.<\/p>\n<pre class=\"op oq or os ot ow ox oy oz ax pa bj\"><span id=\"f3a4\" class=\"pb mp fo ox b ho pc pd l ie pe\" data-selectable-paragraph=\"\">train = train.drop((missing_data[missing_data['Total'] &gt;= 1]).index,1)\ntrain.isnull().sum().max()<\/span><\/pre>\n<p id=\"386a\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">The output of the above code is zero, as expected.<\/p>\n<h1 id=\"9375\" class=\"mo mp fo be mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl bj\" data-selectable-paragraph=\"\">Viewing the Logged Visualizations<\/h1>\n<p id=\"9e61\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">Go to your Comet experiment link and click on the Graphics tab. Here you would find all your plots in one place.<\/p>\n<figure class=\"op oq or os ot mb lt lu paragraph-image\">\n<div class=\"mc md eb me bg mf\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg mg mh c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*wXi4ckFJG64DiDcv4fVTpA.png\" alt=\"\" width=\"700\" height=\"408\"><\/figure><div class=\"lt lu rk\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*wXi4ckFJG64DiDcv4fVTpA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*wXi4ckFJG64DiDcv4fVTpA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*wXi4ckFJG64DiDcv4fVTpA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*wXi4ckFJG64DiDcv4fVTpA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*wXi4ckFJG64DiDcv4fVTpA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*wXi4ckFJG64DiDcv4fVTpA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*wXi4ckFJG64DiDcv4fVTpA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*wXi4ckFJG64DiDcv4fVTpA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"mi mj mk lt lu ml mm be b bf z dv\" data-selectable-paragraph=\"\">Source: Author<\/figcaption>\n<\/figure>\n<p id=\"7b3d\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">Beautiful! Isn\u2019t it?<\/p>\n<p id=\"f3a0\" class=\"pw-post-body-paragraph nm nn fo be b no oj nq nr ns ok nu nv nw ol ny nz oa om oc od oe on og oh oi fh bj\" data-selectable-paragraph=\"\">You can use these charts and plots seamlessly across your reports.<\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fh fi fj fk fl\">\n<div class=\"ab ca\">\n<div class=\"ch bg et eu ev ew\">\n<blockquote class=\"rb rc rd\"><p id=\"d400\" class=\"nm nn re be b no oj nq nr ns ok nu nv rf ol ny nz rg om oc od rh on og oh oi fh bj\" data-selectable-paragraph=\"\">Note: Don\u2019t forget to call <strong class=\"be ph\"><em class=\"fo\">experiment.end()<\/em><\/strong> when using a Jupyter Notebook.<\/p><\/blockquote>\n<h1 id=\"edf2\" class=\"mo mp fo be mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl bj\" data-selectable-paragraph=\"\">Summary<\/h1>\n<p id=\"098b\" class=\"pw-post-body-paragraph nm nn fo be b no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi fh bj\" data-selectable-paragraph=\"\">In this post, you learned the importance of Exploratory Data Analysis along with a sneak peek into using Comet to log visualizations seamlessly across projects and teams. You analyzed the housing price data in relation to various exogenous variables like area, locality, and other facilities. You learned to choose plots for univariate, bivariate, and multivariate analysis along with an introduction to the Seaborn package.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Source: Photo by Pixabay Introduction Exploratory Data Analysis (EDA) is one of the primary tasks a Data Scientist performs when starting to work on a new data set. The process informs us about the distribution or the relationship between the variables, identifies missing and unclean data, and identifies outliers. This helps in designing and upgrading [&hellip;]<\/p>\n","protected":false},"author":91,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"customer_name":"","customer_description":"","customer_industry":"","customer_technologies":"","customer_logo":"","footnotes":""},"categories":[9,7],"tags":[],"coauthors":[188],"class_list":["post-7469","post","type-post","status-publish","format-standard","hentry","category-product","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Exploratory Data Analysis: Logging Seaborn Visualizations with Comet - Comet<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet\" \/>\n<meta property=\"og:description\" content=\"Source: Photo by Pixabay Introduction Exploratory Data Analysis (EDA) is one of the primary tasks a Data Scientist performs when starting to work on a new data set. The process informs us about the distribution or the relationship between the variables, identifies missing and unclean data, and identifies outliers. This helps in designing and upgrading [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/\" \/>\n<meta property=\"og:site_name\" content=\"Comet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cometdotml\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-13T00:29:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T17:14:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg\" \/>\n<meta name=\"author\" content=\"Vidhi Chugh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Cometml\" \/>\n<meta name=\"twitter:site\" content=\"@Cometml\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vidhi Chugh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet - Comet","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/","og_locale":"en_US","og_type":"article","og_title":"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet","og_description":"Source: Photo by Pixabay Introduction Exploratory Data Analysis (EDA) is one of the primary tasks a Data Scientist performs when starting to work on a new data set. The process informs us about the distribution or the relationship between the variables, identifies missing and unclean data, and identifies outliers. This helps in designing and upgrading [&hellip;]","og_url":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/","og_site_name":"Comet","article_publisher":"https:\/\/www.facebook.com\/cometdotml","article_published_time":"2023-09-13T00:29:46+00:00","article_modified_time":"2025-04-24T17:14:06+00:00","og_image":[{"url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg","type":"","width":"","height":""}],"author":"Vidhi Chugh","twitter_card":"summary_large_image","twitter_creator":"@Cometml","twitter_site":"@Cometml","twitter_misc":{"Written by":"Vidhi Chugh","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#article","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/"},"author":{"name":"Vidhi Chugh","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/a59b3630d8ce4d8b0392b18b4ca802c8"},"headline":"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet","datePublished":"2023-09-13T00:29:46+00:00","dateModified":"2025-04-24T17:14:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/"},"wordCount":1232,"publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg","articleSection":["Product","Tutorials"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/","url":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/","name":"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet - Comet","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#primaryimage"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg","datePublished":"2023-09-13T00:29:46+00:00","dateModified":"2025-04-24T17:14:06+00:00","breadcrumb":{"@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#primaryimage","url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg","contentUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*QH0b1i2sRHDUlYdng6lQkw.jpeg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.comet.com\/site\/blog\/exploratory-data-analysis-logging-seaborn-visualizations-with-comet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.comet.com\/site\/"},{"@type":"ListItem","position":2,"name":"Exploratory Data Analysis: Logging Seaborn Visualizations with Comet"}]},{"@type":"WebSite","@id":"https:\/\/www.comet.com\/site\/#website","url":"https:\/\/www.comet.com\/site\/","name":"Comet","description":"Build Better Models Faster","publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.comet.com\/site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.comet.com\/site\/#organization","name":"Comet ML, Inc.","alternateName":"Comet","url":"https:\/\/www.comet.com\/site\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","width":310,"height":310,"caption":"Comet ML, Inc."},"image":{"@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/cometdotml","https:\/\/x.com\/Cometml","https:\/\/www.youtube.com\/channel\/UCmN63HKvfXSCS-UwVwmK8Hw"]},{"@type":"Person","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/a59b3630d8ce4d8b0392b18b4ca802c8","name":"Vidhi Chugh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/image\/59f05f3d17cbe74c5f563a538a3a1735","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/09\/1661260473361-96x96.jpg","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/09\/1661260473361-96x96.jpg","caption":"Vidhi Chugh"},"url":"https:\/\/www.comet.com\/site\/blog\/author\/vidhi_chughyahoo-in\/"}]}},"_links":{"self":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/users\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/comments?post=7469"}],"version-history":[{"count":1,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7469\/revisions"}],"predecessor-version":[{"id":15543,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7469\/revisions\/15543"}],"wp:attachment":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/media?parent=7469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/categories?post=7469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/tags?post=7469"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/coauthors?post=7469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}